From 4910932c43246104a8fdfc8aa0c9990adaf35df2 Mon Sep 17 00:00:00 2001 From: Fr4nzD13trich Date: Fri, 2 Jan 2026 17:24:11 +0100 Subject: [PATCH] FISH config removal process added --- helium_helper.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/helium_helper.sh b/helium_helper.sh index bee6a15..d6687c9 100755 --- a/helium_helper.sh +++ b/helium_helper.sh @@ -229,10 +229,11 @@ add_alias() { echo " $SCRIPT_PATH/$SCRIPT_FILE_NAME \$argv" >> $HOME/.config/fish/$ALIAS.fish echo "end" >> $HOME/.config/fish/$ALIAS.fish echo "source $HOME/.config/fish/$ALIAS.fish" >> $HOME/.config/fish/config.fish - echo -e "\n ${LCY}$ALIAS ${GRN}added to${CRS} $HOME/.config/fish/$ALIAS.fish\n" + echo -e "\n ${LCY}$ALIAS ${GRN}added to${CRS} $HOME/.config/fish/config.fish\n" else - echo -e "\n ${RED}No shell config file found!${CRS}\n" + echo -e "\n ${LCY}$ACTIVE_SHELL ${RED}not yet supported!${CRS}\n" + echo -e " ${LCY}Working implementation are available for bash, zsh & fish!${CRS}\n" fi } @@ -348,6 +349,12 @@ remove_helium() { sed -i "/$ALIAS/d" $HOME/.bashrc fi + elif [ "$ACTIVE_SHELL" == "fish" ] ; then + if [ "$(cat $HOME/.config/fish/config.fish | grep "source $HOME/.config/fish/$ALIAS.fish")" ] ; then + sed -i "/$ALIAS/d" $HOME/.config/fish/config.fish + rm $HOME/.config/fish/$ALIAS.fish + fi + fi echo -e "\n ${RED}$APP_NAME_LONG removed!${CRS}\n" @@ -523,7 +530,7 @@ help() { echo -e "Options:\n" echo -e "\t-i\tDownload & install $APP_NAME_LONG from $APP_SOURCE" echo -e "\t-l\tCreate desktop launcher" - echo -e "\t-a\tCreate alias for $SCRIPT_FILE_NAME ${YEL}--> Working with zsh & bash${CRS}" + echo -e "\t-a\tCreate alias for $SCRIPT_FILE_NAME" echo -e "\t-u\tDownload & update $APP_NAME_LONG from $APP_SOURCE" #echo -e "\t-U\tEnable automatic updates on login ${RED}--> Not yet working${CRS}" echo -e "\t-r\tRemove $APP_NAME_LONG"