diff --git a/custom-completions/scoop/scoop-completions.nu b/custom-completions/scoop/scoop-completions.nu index 9c0113b..e4c250b 100644 --- a/custom-completions/scoop/scoop-completions.nu +++ b/custom-completions/scoop/scoop-completions.nu @@ -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 diff --git a/make_release/get_coverage.nu b/make_release/get_coverage.nu index 4bf1bfe..651f4cc 100755 --- a/make_release/get_coverage.nu +++ b/make_release/get_coverage.nu @@ -9,7 +9,7 @@ def main [ ] { cargo llvm-cov show-env --export-prefix | lines | - str substring '7,' | + str substring 7.. | split column '=' | str trim -c '"' | transpose | diff --git a/nvim/nvim.nu b/nvim/nvim.nu index e3314a6..9d47a8f 100644 --- a/nvim/nvim.nu +++ b/nvim/nvim.nu @@ -54,7 +54,7 @@ export-env { def edit [action file] { if 'NVIM' in ($env | columns) { let af = ($file | each {|f| - if ($f|str substring ',1') in ['/', '~'] { + if ($f|str substring ..1) in ['/', '~'] { $f } else { $"($env.PWD)/($f)" diff --git a/prompt/oh-my-minimal.nu b/prompt/oh-my-minimal.nu index e05c3cf..72330e8 100644 --- a/prompt/oh-my-minimal.nu +++ b/prompt/oh-my-minimal.nu @@ -51,7 +51,7 @@ export def path_abbrev_if_needed [apath term_width] { if (($apath | str length) > ($term_width / 2)) { # get all the tokens except the last let tokens = ($splits | take ($splits_len - 1) | each {|x| - $"($T)($x | str substring 0,1)($R)" + $"($T)($x | str substring 0..1)($R)" }) # append the last part of the path @@ -71,7 +71,7 @@ export def path_abbrev_if_needed [apath term_width] { let top_part = ($splits | first ($splits_len - 1)) let end_part = ($splits | last) let tokens = ($top_part | each {|x| - $"/($T)($x | str substring 0,1)($R)" + $"/($T)($x | str substring 0..1)($R)" }) let tokens = ($tokens | append $"/($PB)($end_part)($R)") $tokens | skip 1 | str join $"($T)" diff --git a/prompt/oh-my.nu b/prompt/oh-my.nu index abe0e2f..8d8a55a 100644 --- a/prompt/oh-my.nu +++ b/prompt/oh-my.nu @@ -26,7 +26,7 @@ def home_abbrev [os_name] { } else { if ($os_name =~ "windows") { # remove the C: from the path - $env.PWD | str replace -a '\\' '/' | str substring '2,' + $env.PWD | str replace -a '\\' '/' | str substring 2.. } else { $env.PWD } diff --git a/prompt/panache-git.nu b/prompt/panache-git.nu index b5bd0a6..1bf7f40 100644 --- a/prompt/panache-git.nu +++ b/prompt/panache-git.nu @@ -77,7 +77,7 @@ export def repo-structured [] { | split column ' ' col1 col2 full_hash | get full_hash | first - | str substring [0 7] + | str substring 0..7 } else { '' })