Skip to content

Commit

Permalink
Merge pull request #401 from ivan-hc/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
ivan-hc committed Apr 16, 2024
2 parents 787058a + 8859d47 commit a9e0c5c
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion APP-MANAGER
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,21 @@ case "$1" in
$SUDOCOMMAND mv "$COMPLETIONFILE" "$COMPLETIONPATH/" 2> /dev/null
echo " Completion has been enabled!"
fi
if [ -f "$HOME/.zshrc" ] || [ -f "$ZDOTDIR/.zshrc" ]; then
if [ -n "$ZDOTDIR" ]; then
ZSHDIR="$ZDOTDIR"
else
ZSHDIR="$HOME"
fi
if grep -q "source $ZSHDIR/$COMPLETIONFILE" "$ZSHDIR/.zshrc"; then
echo "Zsh completion already enabled!"
else
echo '#!/usr/bin/env bash' >> "$ZSHDIR/$COMPLETIONFILE"
echo 'complete -W "$(cat '"$AMPATH"'/list 2>/dev/null)" '"$AMCLI"'' >> "$ZSHDIR/$COMPLETIONFILE"
chmod a+x "$ZSHDIR/$COMPLETIONFILE"
echo -e "autoload bashcompinit\nbashcompinit\nsource $ZSHDIR/$COMPLETIONFILE" >> "$ZSHDIR/.zshrc"
fi
fi
;;

'--launcher')
Expand Down Expand Up @@ -498,7 +513,7 @@ case "$1" in

'version'|'-v'|'--version')

echo "6.5";;
echo "6.5.1";;

*) exec "$AMCLIPATH" ;;

Expand Down

0 comments on commit a9e0c5c

Please sign in to comment.