mirror of
https://github.com/zsh-users/zsh-autosuggestions.git
synced 2024-12-28 15:14:51 +08:00
Fix installation bug.
If the install script is run from an alternative directory the use of pwd incorrectly sets the path to .zsh-autosuggesionsrc
This commit is contained in:
parent
03c5a52a89
commit
c54c2415f0
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user