From 84dd4de9295b7e9163a23e52a831a972b9f20033 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Sat, 27 Aug 2022 11:09:55 +0900 Subject: [PATCH] Should not exit zsh when 'set -u' is set Close #7 --- fzf-git.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fzf-git.sh b/fzf-git.sh index 17f11e3..66e7f05 100644 --- a/fzf-git.sh +++ b/fzf-git.sh @@ -221,7 +221,7 @@ _fzf_git_each_ref() { awk '{print $2}' } -if [[ -n $BASH_VERSION ]]; then +if [[ -n "${BASH_VERSION:-}" ]]; then __fzf_git_init() { bind '"\er": redraw-current-line' local o @@ -230,7 +230,7 @@ if [[ -n $BASH_VERSION ]]; then bind '"\C-g'${o:0:1}'": "$(_fzf_git_'$o')\e\C-e\er"' done } -elif [[ -n $ZSH_VERSION ]]; then +elif [[ -n "${ZSH_VERSION:-}" ]]; then __fzf_git_join() { local item while read item; do