summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2014-03-31 00:53:35 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2014-03-31 01:01:23 +0900
commit48f9ee6763b1283e5fedbf21399f939e78446806 (patch)
tree936563cd3e8dd472e1f30ffc34dbb82fefe47395
parent52b74abb994c05df62c7e000481e0f0cd6af8359 (diff)
Update install script0.8.2
-rwxr-xr-xinstall7
1 files changed, 5 insertions, 2 deletions
diff --git a/install b/install
index 5446697e..a3a36ba9 100755
--- a/install
+++ b/install
@@ -238,8 +238,9 @@ for shell in bash zsh; do
echo "Update $rc:"
echo " - $src"
- if [ $(grep -F "$src" $rc | wc -l) -gt 0 ]; then
- echo " - Not added (already being sourced)"
+ line=$(grep -nF "$src" $rc | sed 's/:.*//')
+ if [ -n "$line" ]; then
+ echo " - Already exists (line #$line)"
else
echo $src >> $rc
echo " - Added"
@@ -253,5 +254,7 @@ Finished. Reload your .bashrc or .zshrc.
source ~/.zshrc # zsh
To uninstall fzf, simply remove the added line.
+
+For more information, see: https://github.com/junegunn/fzf
EOF