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