feat(nu): Return early if history is disabled (#1807)

This commit is contained in:
Ian Manske 2024-03-04 16:19:13 +00:00 committed by GitHub
parent 5c0455bf9b
commit ede5a5febf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -6,6 +6,9 @@ hide-env -i ATUIN_HISTORY_ID
let ATUIN_KEYBINDING_TOKEN = $"# (random uuid)"
let _atuin_pre_execution = {||
if ($nu | get -i history-enabled) == false {
return
}
let cmd = (commandline)
if ($cmd | is-empty) {
return