From: sev Date: Fri, 18 Oct 2024 21:35:33 +0000 (-0500) Subject: zsh: fix fzf options for history search X-Git-Url: https://git.sev.monster/~sev/dotfiles.git/commitdiff_plain/50816b00c5f65a05f9fa078ca636d46f3b0d5721?ds=inline zsh: fix fzf options for history search turns out you can't combine them --- diff --git a/etc/zsh/.zshrc b/etc/zsh/.zshrc index b5cfaf6..893cac5 100644 --- a/etc/zsh/.zshrc +++ b/etc/zsh/.zshrc @@ -204,7 +204,7 @@ unset a k v # bash-style reverse-search-history (i.e. reverse-i-search) if [[ -v commands[fzf] ]] { function _history-incremental-pattern-search-fzf { - l=(${(f)"$(fc -li -1 0 | fzf -emn 1 +s --preview-window=hidden ${BUFFER:+-q $BUFFER})"}) + l=(${(f)"$(fc -li -1 0 | fzf -e -m -n 1 +s --preview-window=hidden ${BUFFER:+-q $BUFFER})"}) l=$(for x ("${l[@]}") { echo ${${=x}:3}; }) BUFFER="$l" }