Skip to content

Commit 365b883

Browse files
authored
fix: replace deprecated get -i with get -o (#1151)
1 parent 177bcdb commit 365b883

File tree

12 files changed

+17
-17
lines changed

12 files changed

+17
-17
lines changed

custom-completions/poetry/poetry-completions.nu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ def "nu-complete poetry setting-values" [context: string]: nothing -> list<any>
167167
return {
168168
"installer.max-workers": [5 6 8 10 12 14 16 20 24 32 32 36 52 56 84 100 104]
169169
"virtualenvs.prompt": ["\"{project_name}-py{python_version}\""]
170-
} | get -i $final_context
170+
} | get -o $final_context
171171
}
172172

173173
# Export formats

make_release/nu_deps.nu

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
# Extract target-specific dependencies from an opened Cargo.toml
77
def get-target-dependencies [] {
8-
let target = ($in | get -i target)
8+
let target = ($in | get -o target)
99

1010
mut res = []
1111

@@ -14,7 +14,7 @@ def get-target-dependencies [] {
1414
}
1515

1616
for col in ($target | columns) {
17-
let deps = ($target | get -i $col | get -i dependencies)
17+
let deps = ($target | get -o $col | get -o dependencies)
1818
if not ($deps | is-empty) {
1919
$res ++= ($deps | columns)
2020
}
@@ -31,8 +31,8 @@ def find-deps [] {
3131
let data = (open $toml)
3232

3333
mut deps = []
34-
$deps ++= ($data | get -i 'dependencies' | default {} | columns)
35-
$deps ++= ($data | get -i 'dev-dependencies' | default {} | columns)
34+
$deps ++= ($data | get -o 'dependencies' | default {} | columns)
35+
$deps ++= ($data | get -o 'dev-dependencies' | default {} | columns)
3636
$deps ++= ($data | get-target-dependencies)
3737
let $deps = ($deps
3838
| where ($it | str starts-with 'nu-')

make_release/this_week_in_nu_weekly.nu

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def query-week-span [] {
6969
)
7070

7171
if not ($site_json | all { |it| $it | is-empty }) {
72-
let heading_name = ($repo_headings | get -i $repo | default $repo)
72+
let heading_name = ($repo_headings | get -o $repo | default $repo)
7373
print $"(char nl)## ($heading_name)(char nl)"
7474

7575
for user in ($site_json | group-by "user.login" | transpose user prs) {
@@ -92,7 +92,7 @@ def query-week-span [] {
9292
}
9393

9494
let has_token = (try { gh auth token }) != null
95-
let has_username_pw = ($env | get -i GITHUB_USERNAME | is-not-empty) and ($env | get -i GITHUB_PASSWORD | is-not-empty)
95+
let has_username_pw = ($env | get -o GITHUB_USERNAME | is-not-empty) and ($env | get -o GITHUB_PASSWORD | is-not-empty)
9696

9797
if not ($has_token or $has_username_pw) {
9898
print "This script requires either a working GitHub client that returns `gh auth token` or"

modules/aws/select-aws-profile.nu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export def --env main [] {
2727
AWS_SECRET_ACCESS_KEY: ($creds | get $selected_profile | get "aws_secret_access_key"),
2828
}
2929

30-
let region = ($creds | get $selected_profile | get -i "region")
30+
let region = ($creds | get $selected_profile | get -o "region")
3131
if $region != null {
3232
$out | insert AWS_REGION $region
3333
} else {

modules/formats/remove-diacritics.nu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export def main [
3838
|split chars
3939
|each {|char|
4040
$diacritics_map
41-
|get -i -s $char
41+
|get -o -s $char
4242
|default $char
4343
}
4444
|str join ''

modules/language/playground/mod.nu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export def play [
2121
closure: closure
2222
] {
2323
let is_tag_empty = ($tag | is-empty);
24-
let should_run_all = ($env | get -i RUN_ALL | default false);
24+
let should_run_all = ($env | get -o RUN_ALL | default false);
2525

2626
if $is_tag_empty {
2727
do $closure $topic

modules/network/remoting/remoting.nu

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def "nu-complete hosts" [] {
2424
def "nu-complete scripts" [] {
2525
scope commands
2626
|where is_custom
27-
|get -i command
27+
|get -o command
2828
}
2929

3030
# Returns ssh connection as url to be consumed by original ssh command
@@ -43,7 +43,7 @@ export def ssh [
4343
hostname: string@"nu-complete hosts" # name of the host you want to connect to
4444
...args # commands you wish to run on the host
4545
] {
46-
let host = (hosts|where name == $hostname|get -i 0)
46+
let host = (hosts|where name == $hostname|get -o 0)
4747
if ($host.nu) {
4848
if ($args|length) > 0 {
4949
^ssh (get-url $host) (build-string ($args|str join ' ') '|to json -r')|from json

modules/nvim/mod.nu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export def tcd [path?: string] {
5151

5252
export-env {
5353
$env.config = ( $env.config | upsert hooks.env_change.PWD { |config|
54-
let o = ($config | get -i hooks.env_change.PWD)
54+
let o = ($config | get -o hooks.env_change.PWD)
5555
let val = (nvim_tcd)
5656
if $o == null {
5757
$val

nu-hooks/nu-hooks/direnv/direnv.nu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def direnv [] {
2121

2222
export-env {
2323
$env.config = ( $env.config | upsert hooks.env_change.PWD { |config|
24-
let o = ($config | get -i hooks.env_change.PWD)
24+
let o = ($config | get -o hooks.env_change.PWD)
2525
let val = (direnv)
2626
if $o == null {
2727
$val

nu-hooks/nu-hooks/dynamic-load/dynamic-load.nu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ def dynamic_load [] {
99

1010
export-env {
1111
$env.config = ( $env.config | upsert hooks.env_change.PWD { |config|
12-
let o = ($config | get -i hooks.env_change.PWD)
12+
let o = ($config | get -o hooks.env_change.PWD)
1313
let val = (dynamic_load)
1414
if $o == null {
1515
$val

0 commit comments

Comments
 (0)