1
Fork 0
mirror of https://github.com/RGBCube/nu_scripts synced 2025-08-01 14:47:47 +00:00

update range syntax in str substring usage (#448)

This commit is contained in:
Darren Schroeder 2023-04-16 07:15:37 -05:00 committed by GitHub
parent 2d12532495
commit 87655ab380
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 7 additions and 7 deletions

View file

@ -33,7 +33,7 @@ def scoopInstalledAppsWithStar [] {
# list of all manifests from all buckets
def scoopAllApps [] {
let bucketsDir = if ('SCOOP' in (env).name) { [ (getenv 'SCOOP'), 'buckets' ] | path join } else { [ (getenv 'USERPROFILE'), 'scoop', 'buckets' ] | path join }
(ls -s $bucketsDir | get name) | each {|bucket| ls ([$bucketsDir, $bucket, 'bucket', '*.json'] | str join '\') | get name | path basename | str substring ',-5' } | flatten | uniq
(ls -s $bucketsDir | get name) | each {|bucket| ls ([$bucketsDir, $bucket, 'bucket', '*.json'] | str join '\') | get name | path basename | str substring ..-5 } | flatten | uniq
}
# list of all apps that are not installed