Created by: ashwin
Autojump path is repeatedly added to $PATH
on repeated sourcing in Fish shell:
$ echo $PATH
/home/joe/.autojump/bin /home/joe/bin /usr/local/sbin /usr/local/bin /usr/sbin /usr/bin /sbin /bin
$ source ~/.config/fish/config.fish
$ echo $PATH
/home/joe/.autojump/bin /home/joe/.autojump/bin /home/joe/bin /usr/local/sbin /usr/local/bin /usr/sbin /usr/bin /sbin /bin
Sourcing is a common operation in Fish shell to update the current shell after making changes to ~/.config/fish/config.fish
This commit prevents the repeated addition of Autojump path by checking if it is already in $PATH
.