1
0
mirror of https://github.com/wting/autojump synced 2024-10-27 20:34:07 +00:00

Autojump is not repeatedly added to $PATH on repeated sourcing in Fish.

This commit is contained in:
Ashwin Nanjappa 2015-07-31 10:57:48 +08:00
parent 113a84f9f0
commit 10027b98ab

View File

@ -1,8 +1,14 @@
set -x AUTOJUMP_SOURCED 1
# set user installation path
if test -d ~/.autojump
set -x PATH ~/.autojump/bin $PATH
# Set user installation path
begin
set --local AUTOJUMP_BIN_PATH ~/.autojump/bin
if test -d $AUTOJUMP_BIN_PATH
# Add to PATH only if autojump not sourced yet
if not contains $AUTOJUMP_BIN_PATH $PATH
set -x PATH $AUTOJUMP_BIN_PATH $PATH
end
end
end
# Set ostype, if not set