From d12bc6f756b1d15ab534bdf5fa96c10375db053e Mon Sep 17 00:00:00 2001 From: "Kenneth Benzie (Benie)" Date: Wed, 1 May 2024 21:41:49 +0100 Subject: [PATCH] Make C-r work more like build-dir --- zshrc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/zshrc b/zshrc index 7cf6355..759f1a2 100644 --- a/zshrc +++ b/zshrc @@ -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