fix(keybind): bypass history shadow in ctrl-alt-u empty-prompt recall
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user