From e7a8e040cc02fe80ccb39a42ec758c059fd8cacb Mon Sep 17 00:00:00 2001 From: Joaquín Triñanes Date: Wed, 23 Jul 2025 13:28:54 +0200 Subject: nushell: fix `get -i` deprecation (#2829) Since https://github.com/nushell/nushell/pull/16007, the recommended flag is `--optional`. To avoid compatibility issues, the builtin optional access syntax is used instead, which is backwards-compatible. --- crates/atuin/src/shell/atuin.nu | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/atuin/src/shell/atuin.nu b/crates/atuin/src/shell/atuin.nu index 684fd12e..0e4ff691 100644 --- a/crates/atuin/src/shell/atuin.nu +++ b/crates/atuin/src/shell/atuin.nu @@ -15,7 +15,7 @@ hide-env -i ATUIN_HISTORY_ID let ATUIN_KEYBINDING_TOKEN = $"# (random uuid)" let _atuin_pre_execution = {|| - if ($nu | get -i history-enabled) == false { + if ($nu | get history-enabled?) == false { return } let cmd = (commandline) @@ -65,9 +65,9 @@ $env.config = ( $env.config | upsert hooks ( $env.config.hooks | upsert pre_execution ( - $env.config.hooks | get -i pre_execution | default [] | append $_atuin_pre_execution) + $env.config.hooks | get pre_execution? | default [] | append $_atuin_pre_execution) | upsert pre_prompt ( - $env.config.hooks | get -i pre_prompt | default [] | append $_atuin_pre_prompt) + $env.config.hooks | get pre_prompt? | default [] | append $_atuin_pre_prompt) ) ) -- cgit v1.3.1