summaryrefslogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2015-11-09 01:48:55 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2015-11-09 01:48:55 +0900
commit90d32bd7562be34ee2e6f28b840def0d6017e7e1 (patch)
tree8d8bed6717071f837126a41a64752f04e6eb4c45 /install
parente99731ea852d1faac5390594cd980708edf826cf (diff)
[install] Fix #414 - Respect $ZDOTDIR
Diffstat (limited to 'install')
-rwxr-xr-xinstall5
1 files changed, 3 insertions, 2 deletions
diff --git a/install b/install
index b60fc00b..b7ed2643 100755
--- a/install
+++ b/install
@@ -342,7 +342,8 @@ append_line() {
echo
for shell in bash zsh; do
- append_line $update_config "[ -f ~/.fzf.${shell} ] && source ~/.fzf.${shell}" ~/.${shell}rc "~/.fzf.${shell}"
+ [ $shell = zsh ] && dest=${ZDOTDIR:-~}/.zshrc || dest=~/.bashrc
+ append_line $update_config "[ -f ~/.fzf.${shell} ] && source ~/.fzf.${shell}" "$dest" "~/.fzf.${shell}"
done
if [ $key_bindings -eq 1 -a $has_fish -eq 1 ]; then
@@ -353,7 +354,7 @@ fi
cat << EOF
Finished. Restart your shell or reload config file.
source ~/.bashrc # bash
- source ~/.zshrc # zsh
+ source ${ZDOTDIR:-~}/.zshrc # zsh
EOF
[ $has_fish -eq 1 ] && echo " fzf_key_bindings # fish"; cat << EOF