Skip to content

Commit

Permalink
perform duplicat check for adding variable to list
Browse files Browse the repository at this point in the history
Signed-off-by: Tin Lai <[email protected]>
  • Loading branch information
soraxas committed Jun 7, 2023
1 parent bc5c3de commit f614199
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions libexec/shsh-init
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,10 @@ print_fish_commands() {
# echo 'not contains $SHSH_ROOT/cellar/bin $fish_user_paths'
if [ -d "$SHSH_JUNEST_BIN" ]; then
echo 'set -gx SHSH_JUNEST_BIN "'"$SHSH_JUNEST_BIN"'"'
echo 'set -ax PATH $SHSH_JUNEST_BIN'
echo 'set -ax fish_user_paths $SHSH_JUNEST_BIN'
fi
echo 'set -px fish_user_paths $SHSH_ROOT/cellar/bin'

# echo 'not contains $SHSH_ROOT/cellar/bin $PATH'
# echo 'and set -gx PATH $SHSH_ROOT/cellar/bin $PATH'

echo 'contains $SHSH_ROOT/cellar/bin $fish_user_paths'
echo 'or set -p fish_user_paths $SHSH_ROOT/cellar/bin'
}

print_sh_commands(){
Expand Down Expand Up @@ -92,6 +89,7 @@ case "$shell" in
load_zsh_package_completions
;;
fish )
echo 'set -px fish_complete_path $SHSH_PREFIX/completions/fish'
echo 'contains $SHSH_PREFIX/completions/fish $fish_complete_path'
echo 'or set -p fish_complete_path $SHSH_PREFIX/completions/fish'
;;
esac

0 comments on commit f614199

Please sign in to comment.