Update nushell config

This commit is contained in:
2025-08-05 09:17:44 +01:00
parent d06f78bddf
commit 645baf78f4
2 changed files with 4 additions and 4 deletions

View File

@@ -6,7 +6,7 @@ hide-env -i ATUIN_HISTORY_ID
let ATUIN_KEYBINDING_TOKEN = $"# (random uuid)" let ATUIN_KEYBINDING_TOKEN = $"# (random uuid)"
let _atuin_pre_execution = {|| let _atuin_pre_execution = {||
if ($nu | get -i history-enabled) == false { if ($nu | get -o history-enabled) == false {
return return
} }
let cmd = (commandline) let cmd = (commandline)
@@ -51,9 +51,9 @@ $env.config = (
$env.config | upsert hooks ( $env.config | upsert hooks (
$env.config.hooks $env.config.hooks
| upsert pre_execution ( | upsert pre_execution (
$env.config.hooks | get -i pre_execution | default [] | append $_atuin_pre_execution) $env.config.hooks | get -o pre_execution | default [] | append $_atuin_pre_execution)
| upsert pre_prompt ( | upsert pre_prompt (
$env.config.hooks | get -i pre_prompt | default [] | append $_atuin_pre_prompt) $env.config.hooks | get -o pre_prompt | default [] | append $_atuin_pre_prompt)
) )
) )

View File

@@ -1,5 +1,5 @@
def get_env [s: string] { def get_env [s: string] {
try { $env | get --optional $s } catch { "" } try { $env | get -o $s } catch { "" }
} }
export def was_successful [] { export def was_successful [] {