Make C-r work more like build-dir

This commit is contained in:
Kenneth Benzie 2024-05-01 21:41:49 +01:00
parent e269e6ff8d
commit d12bc6f756

6
zshrc
View File

@ -149,11 +149,15 @@ fi
# Fuzzy history search with fzf
function fzf-history-search() {
local selected
selected=`history | sed 's/ *[0-9]* *//' | fzf`
selected=$(
history | sed 's/ *[0-9]* *//' |
fzf --layout=reverse --tac --info=hidden --border=rounded --height=50%
)
if [[ -n "$selected" ]]; then
BUFFER="$selected"
zle end-of-line
fi
zle reset-prompt
}
zle -N fzf-history-search
bindkey '^R' fzf-history-search