aboutsummaryrefslogtreecommitdiffstats
path: root/crates
diff options
context:
space:
mode:
authorJoaquín Triñanes <hi@joaquint.io>2025-07-23 13:28:54 +0200
committerGitHub <noreply@github.com>2025-07-23 13:28:54 +0200
commite7a8e040cc02fe80ccb39a42ec758c059fd8cacb (patch)
treea8dcbb9d290a70aee53085627e5cde08d3d9d243 /crates
parentfix: Make login exit 1 if already logged in (#2832) (diff)
downloadatuin-e7a8e040cc02fe80ccb39a42ec758c059fd8cacb.zip
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.
Diffstat (limited to 'crates')
-rw-r--r--crates/atuin/src/shell/atuin.nu6
1 files 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)
)
)