@@ -40,15 +40,15 @@ def scoopAllApps [] {
40
40
} else {
41
41
[ $env .USERPROFILE , ' scoop' , ' buckets' ] | path join
42
42
}
43
- (ls - s $bucketsDir | get name ) | each {|bucket | ls ([$bucketsDir , $bucket , ' bucket' , ' *.json ' ] | path join ) | get name | path basename | str substring .. -5 } | flatten | uniq
43
+ (ls - s $bucketsDir | get name ) | each {|bucket | ls ([$bucketsDir , $bucket , ' bucket' ] | path join ) | get name | path parse | where extension == json | get stem } | flatten | uniq
44
44
}
45
45
46
46
# list of all apps that are not installed
47
47
def scoopAvailableApps [] {
48
48
let all = (scoopAllApps )
49
49
let installed = (scoopInstalledApps )
50
50
51
- $all | where not $it in $installed
51
+ $all | where $it not- in $installed
52
52
}
53
53
54
54
# list of all config options
@@ -117,7 +117,7 @@ def scoopCommands [] {
117
117
[value , description ];
118
118
[
119
119
# eg. scoop-help.ps1 -> help
120
- ($command.name | path basename | str substring 6 .. -4 ),
120
+ ($command.name | path parse | get stem | str substring 6 .. ),
121
121
# second line is starts with '# Summary: '
122
122
# eg. '# Summary: Install apps' -> 'Install apps'
123
123
(open $command.name | lines | skip 1 | first | str substring 11 .. )
@@ -130,15 +130,7 @@ def scoopCommands [] {
130
130
}
131
131
132
132
def scoopAliases [] {
133
- ^ powershell - nop - nol - c " (scoop alias list|ConvertTo-Json -Compress)"
134
- | decode
135
- | str trim
136
- | lines
137
- | last
138
- | to text
139
- | ' [' + $in + ' ]'
140
- | from json
141
- | get Name
133
+ scoop alias list | str trim | lines | slice 2 .. | split column " " | get column1
142
134
}
143
135
144
136
def batStyles [] {
@@ -658,7 +650,7 @@ export extern "scoop download" [
658
650
################################################################
659
651
660
652
def scoopKnownBuckets [] {
661
- [ " main" , " extras" , " versions" , " nirsoft" , " php" , " nerd-fonts" , " nonportable" , " java" , " games" ]
653
+ [ " main" , " extras" , " versions" , " nirsoft" , " php" , " nerd-fonts" , " nonportable" , " java" , " games" , " sysinternals " ]
662
654
}
663
655
664
656
def scoopInstalledBuckets [] {
@@ -676,7 +668,7 @@ def scoopAvailableBuckets [] {
676
668
let known = (scoopKnownBuckets )
677
669
let installed = (scoopInstalledBuckets )
678
670
679
- $known | where not $it in $installed
671
+ $known | where $it not- in $installed
680
672
}
681
673
682
674
# Add, list or remove buckets.
0 commit comments