-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathalias-additions.json
49 lines (48 loc) · 4.24 KB
/
alias-additions.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
{
"homepage": "https://github.com/snaphat/alias-additions",
"description": "Adds an alias 'scoop update-all' for updating scoops and apps, 'scoop cleanup-all' for removing old versions of all apps, 'scoop cache-show-all' for showing the download cache of all apps, 'scoop cache-rm-all' for clearing the download cache of all apps, 'scoop list-all' which list all app names, 'scoop info-all' which list all apps with their description, 'scoop search-info <\"keyword\">' which searches all app descriptions and returns apps containing the specified keyword, and 'scoop bucket-origin' which list the git origin of all buckets.",
"version": "v0.0.4",
"url": "https://raw.githubusercontent.com/snaphat/alias-additions/master/README.md",
"hash": "1bb5878d806b2d273a84581668b38f436dcbbadfc4aadff2b0d3fe6dd1c81976",
"installer": {
"script": [
"function global:Write-Host() {}",
"scoop alias rm update-all",
"scoop alias rm cleanup-all",
"scoop alias rm cache-show-all",
"scoop alias rm cache-rm-all",
"scoop alias rm list-all",
"scoop alias rm info-all",
"scoop alias rm search-info",
"Remove-Item -Path Function:Write-Host",
"Write-Host -NoNewline \"Adding alias for \"; Write-host -ForegroundColor green \"update-all\"",
"scoop alias add update-all \"scoop update; scoop update `\"*`\"\" \"Update all apps and scoop\"",
"Write-Host -NoNewline \"Adding alias for \"; Write-host -ForegroundColor green \"cleanup-all\"",
"scoop alias add cache-show-all \"scoop cache show `\"*`\"\" \"Show the download cache for all apps\"",
"Write-Host -NoNewline \"Adding alias for \"; Write-host -ForegroundColor green \"cache-show-all\"",
"scoop alias add cache-rm-all \"scoop cache rm `\"*`\"\" \"Clear the download cache for all apps\"",
"Write-Host -NoNewline \"Adding alias for \"; Write-host -ForegroundColor green \"cache-rm-all\"",
"scoop alias add cleanup-all \"scoop cleanup `\"*`\"\" \"Cleanup all apps by removing old versions\"",
"Write-Host -NoNewline \"Adding alias for \"; Write-host -ForegroundColor green \"list-all\"",
"scoop alias add list-all \"ls -recurse `$bucketsdir | Select-String `\".*description`\" | %{`$A=(`$_.filename.substring(0,`$_.filename.length-5)); Write-Host `$A; }\" \"List apps in all buckets\"",
"Write-Host -NoNewline \"Adding alias for \"; Write-host -ForegroundColor green \"info-all\"",
"scoop alias add info-all \"ls -recurse `$bucketsdir | Select-String `\".*description`\" | %{`$A=(`$_.filename.substring(0,`$_.filename.length-5)); `$B=`$_.Line.split('`\"'); `$B=`$B[3..(`$B.length-2)]; Write-Host -NoNewLine -foreground green `$A; Write-Host (`\" `\" *(40-`$A.length)) `$B }\" \"Display information about apps in all buckets\"",
"Write-Host -NoNewline \"Adding alias for \"; Write-host -ForegroundColor green \"search-info\"",
"scoop alias add search-info \"ls -recurse `$bucketsdir | Select-String `\".*description`\" | Select-String `\".*`$(`$args[0]).*`\" | %{`$A=(`$_.filename.substring(0,`$_.filename.length-5)); `$B=`$_.Line.split('`\"'); `$B=`$B[3..(`$B.length-2)]; Write-Host -NoNewLine -foreground green `$A; Write-Host (`\" `\" *(40-`$A.length)) `$B }\" \"Search available apps and display information about each app\"",
"Write-Host -NoNewline \"Adding alias for \"; Write-host -ForegroundColor green \"bucket-origin\"",
"scoop alias add bucket-origin \"Get-ChildItem `$bucketsdir | ForEach-Object { `$BUCKET = `$_.name; `$ORIGIN = `&git -C `$bucketsdir\\`$BUCKET\\ remote get-url origin; Write-Host -NoNewLine -foreground green `$BUCKET; Write-Host (`\" `\" *(40 - `$BUCKET.length)) `$ORIGIN } \" \"Show the scoop buckets and their `\"git origin`\" info\""
]
},
"uninstaller": {
"script": [
"scoop alias rm update-all",
"scoop alias rm cleanup-all",
"scoop alias rm cache-show-all",
"scoop alias rm cache-rm-all",
"scoop alias rm list-all",
"scoop alias rm info-all",
"scoop alias rm search-info",
"scoop alias rm bucket-origin"
]
}
}