[install] Avoid generating empty component in $PATH

Fix #1517
This commit is contained in:
Junegunn Choi 2019-03-08 12:38:36 +09:00
parent 85c1f8a9e0
commit 4f8bf2ae78
No known key found for this signature in database
GPG Key ID: 254BC280FEF9C627

View File

@ -272,7 +272,7 @@ for shell in $shells; do
# Setup fzf # Setup fzf
# --------- # ---------
if [[ ! "\$PATH" == *$fzf_base_esc/bin* ]]; then if [[ ! "\$PATH" == *$fzf_base_esc/bin* ]]; then
export PATH="\$PATH:$fzf_base/bin" export PATH="\${PATH:+\${PATH}:}$fzf_base/bin"
fi fi
# Auto-completion # Auto-completion
@ -282,7 +282,6 @@ $fzf_completion
# Key bindings # Key bindings
# ------------ # ------------
$fzf_key_bindings $fzf_key_bindings
EOF EOF
echo "OK" echo "OK"
done done