diff --git a/init.sh b/init.sh index 0669c31..059fec5 100644 --- a/init.sh +++ b/init.sh @@ -1,4 +1,4 @@ -# Set tmuxifier root path. +# Set/fix Tmuxifier root path if needed. if [ -z "${TMUXIFIER}" ]; then export TMUXIFIER="${HOME}/.tmuxifier" else @@ -11,7 +11,7 @@ if [[ ":$PATH:" != *":$TMUXIFIER/bin:"* ]]; then fi # If `tmuxifier` is available, and `$TMUXIFIER_NO_COMPLETE` is not set, then -# load tmuxifier shell completion. +# load Tmuxifier shell completion. if [ -n "$(command -v "tmuxifier")" ] && [ -z "$TMUXIFIER_NO_COMPLETE" ]; then if [ -n "$BASH_VERSION" ]; then source "$TMUXIFIER/completion/tmuxifier.bash" diff --git a/init.tcsh b/init.tcsh index a681394..c17dd49 100644 --- a/init.tcsh +++ b/init.tcsh @@ -1,13 +1,15 @@ -# Set tmuxifier root path. +# Set Tmuxifier root path if needed. if ( ! $?TMUXIFIER ) then setenv TMUXIFIER "${HOME}/.tmuxifier" endif -# Add `bin` directroy to `$PATH`. -set path = ( $TMUXIFIER/bin $path ) +# Add `bin` directroy to `$path` if needed. +if ( " $path " =~ "* $TMUXIFIER/bin *" ) then + set path = ( $TMUXIFIER/bin $path ) +endif # If `tmuxifier` is available, and `$TMUXIFIER_NO_COMPLETE` is not set, then -# load tmuxifier shell completion. +# load Tmuxifier shell completion. if ( ! $?TMUXIFIER_NO_COMPLETE ) then which tmuxifier > /dev/null && source "$TMUXIFIER/completion/tmuxifier.tcsh" endif