From c54c2415f0925f789f07ea4f193cf2c98a4b2591 Mon Sep 17 00:00:00 2001 From: Robert Baykov Date: Sun, 17 May 2015 23:35:14 -0500 Subject: [PATCH] Fix installation bug. If the install script is run from an alternative directory the use of pwd incorrectly sets the path to .zsh-autosuggesionsrc --- alt-install | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/alt-install b/alt-install index bdc737f..61dc41b 100755 --- a/alt-install +++ b/alt-install @@ -4,6 +4,7 @@ DESCRIPTION="this script adds/removes a .zsh-autosuggestionsrc reference to your .zshrc file." ZSHRC="" +PATH_TO_RC="source $HOME/.zsh-autosuggestions/.zsh-autosuggestionsrc" function usage() { @@ -16,7 +17,7 @@ function usage() function install() { - PATH_TO_RC="source "$(pwd)"/.zsh-autosuggestionsrc" + # check if line exists in zshrc, add it if missing if grep -Fxq "$PATH_TO_RC" "$ZSHRC" then @@ -31,7 +32,6 @@ function install() function uninstall() { - PATH_TO_RC="source "$(pwd)"/.zsh-autosuggestionsrc" # check if line exists in zshrc, remove if preset if grep -Fxq "$PATH_TO_RC" "$ZSHRC" then