fix(keybind): bypass history shadow in ctrl-alt-u empty-prompt recall
CI / github-mirror (push) Skipped
CI / test (push) Successful in 2m3s
CI / build-docs (push) Successful in 4m5s

The tricks.fish C1 history() shadow drops all args and always shows
timestamps. Calling plain history --max 1 hit that shadow, dumping the
entire history with timestamps instead of one plain entry. Use builtin
history --max 1, matching the convention already used by fc.fish,
_fzf_search_history.fish, and bash_expands.fish.
This commit is contained in:
2026-09-21 19:29:37 -04:00
parent 6fd25028d9
commit 392e6593ac
+1 -1
View File
@@ -20,7 +20,7 @@ function _replace_command_token --description 'Remove first command token (or fi
# Empty prompt: recall the last history entry first, same as it would
# behave if that command were already on the commandline.
if string match -rq '^\s*$' -- "$cmd"
set cmd (history --max 1)
set cmd (builtin history --max 1)
end
# 1. Logic for commands starting with sudo