functions.zsh: add check to fzf-open

This commit is contained in:
surtur 2023-09-08 14:29:15 +02:00
parent 5770f77589
commit 7be15c66bc
Signed by: wanderer
SSH Key Fingerprint: SHA256:MdCZyJ2sHLltrLBp0xQO0O1qTW9BT/xl5nXkDvhlMCI

@ -61,8 +61,10 @@ delete-branches() {
fzf-open() { fzf-open() {
local output local output
output=$(fzf </dev/tty) output=$(fzf </dev/tty)
vim --not-a-term ${output} if [ $output != "" ]; then
zle reset-prompt vim --not-a-term ${output}
fi
zle .reset-prompt
} }
zle -N fzf-open zle -N fzf-open