diff --git a/custom-completions/poetry/poetry-completions.nu b/custom-completions/poetry/poetry-completions.nu index 198bbd010..02326177f 100644 --- a/custom-completions/poetry/poetry-completions.nu +++ b/custom-completions/poetry/poetry-completions.nu @@ -167,7 +167,7 @@ def "nu-complete poetry setting-values" [context: string]: nothing -> list return { "installer.max-workers": [5 6 8 10 12 14 16 20 24 32 32 36 52 56 84 100 104] "virtualenvs.prompt": ["\"{project_name}-py{python_version}\""] - } | get -i $final_context + } | get -o $final_context } # Export formats diff --git a/make_release/nu_deps.nu b/make_release/nu_deps.nu index c5ebd1980..afd32a301 100644 --- a/make_release/nu_deps.nu +++ b/make_release/nu_deps.nu @@ -5,7 +5,7 @@ # Extract target-specific dependencies from an opened Cargo.toml def get-target-dependencies [] { - let target = ($in | get -i target) + let target = ($in | get -o target) mut res = [] @@ -14,7 +14,7 @@ def get-target-dependencies [] { } for col in ($target | columns) { - let deps = ($target | get -i $col | get -i dependencies) + let deps = ($target | get -o $col | get -o dependencies) if not ($deps | is-empty) { $res ++= ($deps | columns) } @@ -31,8 +31,8 @@ def find-deps [] { let data = (open $toml) mut deps = [] - $deps ++= ($data | get -i 'dependencies' | default {} | columns) - $deps ++= ($data | get -i 'dev-dependencies' | default {} | columns) + $deps ++= ($data | get -o 'dependencies' | default {} | columns) + $deps ++= ($data | get -o 'dev-dependencies' | default {} | columns) $deps ++= ($data | get-target-dependencies) let $deps = ($deps | where ($it | str starts-with 'nu-') diff --git a/make_release/this_week_in_nu_weekly.nu b/make_release/this_week_in_nu_weekly.nu index 9ffed5a72..f7be72c07 100644 --- a/make_release/this_week_in_nu_weekly.nu +++ b/make_release/this_week_in_nu_weekly.nu @@ -69,7 +69,7 @@ def query-week-span [] { ) if not ($site_json | all { |it| $it | is-empty }) { - let heading_name = ($repo_headings | get -i $repo | default $repo) + let heading_name = ($repo_headings | get -o $repo | default $repo) print $"(char nl)## ($heading_name)(char nl)" for user in ($site_json | group-by "user.login" | transpose user prs) { @@ -92,7 +92,7 @@ def query-week-span [] { } let has_token = (try { gh auth token }) != null -let has_username_pw = ($env | get -i GITHUB_USERNAME | is-not-empty) and ($env | get -i GITHUB_PASSWORD | is-not-empty) +let has_username_pw = ($env | get -o GITHUB_USERNAME | is-not-empty) and ($env | get -o GITHUB_PASSWORD | is-not-empty) if not ($has_token or $has_username_pw) { print "This script requires either a working GitHub client that returns `gh auth token` or" diff --git a/modules/aws/select-aws-profile.nu b/modules/aws/select-aws-profile.nu index 06fdce400..973b10ac8 100644 --- a/modules/aws/select-aws-profile.nu +++ b/modules/aws/select-aws-profile.nu @@ -27,7 +27,7 @@ export def --env main [] { AWS_SECRET_ACCESS_KEY: ($creds | get $selected_profile | get "aws_secret_access_key"), } - let region = ($creds | get $selected_profile | get -i "region") + let region = ($creds | get $selected_profile | get -o "region") if $region != null { $out | insert AWS_REGION $region } else { diff --git a/modules/formats/remove-diacritics.nu b/modules/formats/remove-diacritics.nu index d4152ae0c..34eb5b7ff 100644 --- a/modules/formats/remove-diacritics.nu +++ b/modules/formats/remove-diacritics.nu @@ -38,7 +38,7 @@ export def main [ |split chars |each {|char| $diacritics_map - |get -i -s $char + |get -o -s $char |default $char } |str join '' diff --git a/modules/language/playground/mod.nu b/modules/language/playground/mod.nu index ab36a4006..3f09a882f 100644 --- a/modules/language/playground/mod.nu +++ b/modules/language/playground/mod.nu @@ -21,7 +21,7 @@ export def play [ closure: closure ] { let is_tag_empty = ($tag | is-empty); - let should_run_all = ($env | get -i RUN_ALL | default false); + let should_run_all = ($env | get -o RUN_ALL | default false); if $is_tag_empty { do $closure $topic diff --git a/modules/network/remoting/remoting.nu b/modules/network/remoting/remoting.nu index 2aaba270a..532a9053c 100644 --- a/modules/network/remoting/remoting.nu +++ b/modules/network/remoting/remoting.nu @@ -24,7 +24,7 @@ def "nu-complete hosts" [] { def "nu-complete scripts" [] { scope commands |where is_custom - |get -i command + |get -o command } # Returns ssh connection as url to be consumed by original ssh command @@ -43,7 +43,7 @@ export def ssh [ hostname: string@"nu-complete hosts" # name of the host you want to connect to ...args # commands you wish to run on the host ] { - let host = (hosts|where name == $hostname|get -i 0) + let host = (hosts|where name == $hostname|get -o 0) if ($host.nu) { if ($args|length) > 0 { ^ssh (get-url $host) (build-string ($args|str join ' ') '|to json -r')|from json diff --git a/modules/nvim/mod.nu b/modules/nvim/mod.nu index 9f83b0bd9..868491525 100644 --- a/modules/nvim/mod.nu +++ b/modules/nvim/mod.nu @@ -51,7 +51,7 @@ export def tcd [path?: string] { export-env { $env.config = ( $env.config | upsert hooks.env_change.PWD { |config| - let o = ($config | get -i hooks.env_change.PWD) + let o = ($config | get -o hooks.env_change.PWD) let val = (nvim_tcd) if $o == null { $val diff --git a/nu-hooks/nu-hooks/direnv/direnv.nu b/nu-hooks/nu-hooks/direnv/direnv.nu index 8f927146a..d99c659ec 100644 --- a/nu-hooks/nu-hooks/direnv/direnv.nu +++ b/nu-hooks/nu-hooks/direnv/direnv.nu @@ -21,7 +21,7 @@ def direnv [] { export-env { $env.config = ( $env.config | upsert hooks.env_change.PWD { |config| - let o = ($config | get -i hooks.env_change.PWD) + let o = ($config | get -o hooks.env_change.PWD) let val = (direnv) if $o == null { $val diff --git a/nu-hooks/nu-hooks/dynamic-load/dynamic-load.nu b/nu-hooks/nu-hooks/dynamic-load/dynamic-load.nu index 6a2abfe96..550a87486 100644 --- a/nu-hooks/nu-hooks/dynamic-load/dynamic-load.nu +++ b/nu-hooks/nu-hooks/dynamic-load/dynamic-load.nu @@ -9,7 +9,7 @@ def dynamic_load [] { export-env { $env.config = ( $env.config | upsert hooks.env_change.PWD { |config| - let o = ($config | get -i hooks.env_change.PWD) + let o = ($config | get -o hooks.env_change.PWD) let val = (dynamic_load) if $o == null { $val diff --git a/nu-hooks/nu-hooks/filesystem/autojump.nu b/nu-hooks/nu-hooks/filesystem/autojump.nu index a06b8f353..656349b11 100644 --- a/nu-hooks/nu-hooks/filesystem/autojump.nu +++ b/nu-hooks/nu-hooks/filesystem/autojump.nu @@ -19,7 +19,7 @@ def --env j [...dir] { cd (autojump ...$dir) } $env.config = ($env.config | upsert hooks.env_change.PWD {|config| - let val = ($config | get -i hooks.env_change.PWD) + let val = ($config | get -o hooks.env_change.PWD) if $val == null { $val | append {|before, after| autojump_add_to_database $after } diff --git a/stdlib-candidate-archive/std-rfc/kv/mod.nu b/stdlib-candidate-archive/std-rfc/kv/mod.nu index 084d6169e..55d63f146 100644 --- a/stdlib-candidate-archive/std-rfc/kv/mod.nu +++ b/stdlib-candidate-archive/std-rfc/kv/mod.nu @@ -110,7 +110,7 @@ export def "kv get" [ | $in.std_kv_store | wrap temp | get temp | where key == $key # Should only be one occurence of each key in the stor - | get -i value.0 + | get -o value.0 | match $in { # Key not found null => null