From b1fb07c03c5bf22e3ce30e977a5463534fef95a8 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Sun, 14 Nov 2021 19:45:25 +0100 Subject: [PATCH] fix for fish users --- README.md | 11 +++++++---- updateVSCodium.sh | 13 +++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 96e9a6f..3c6acca 100644 --- a/README.md +++ b/README.md @@ -39,9 +39,12 @@ Déjà quelques extensions sympa pour éviter de la chercher soi-même : ```bash rm -r $HOME/.vscodium_scripts ``` -Vous devez aussi retirer les abbrévations/alias ajoutés aux shell dans les fichiers suivant : `.bashrc`, `.zshrc` et dans le fichier de configuration de fish à `~/.config/fish/config.fish`. C'est les lignes où la première ligne commence par: +Vous devez aussi retirer les alias ajoutés aux shell dans les fichiers suivant : `.bashrc` et `.zshrc`. C'est les lignes où la première ligne commence par: ```bash # Alias for Codium -ou -# Abbrevations for Codium -``` \ No newline at end of file +``` +Pour les utilisateurs de Fish, vous n'avez pas de lignes à supprimer mais des commandes à entrer : +```bash +abbr --erase updateCodium +abbr --erase code +``` diff --git a/updateVSCodium.sh b/updateVSCodium.sh index 09173bc..c96cbe8 100644 --- a/updateVSCodium.sh +++ b/updateVSCodium.sh @@ -34,7 +34,7 @@ else # if the folder isn't already created (first run?) echo "alias updateCodium='bash \$HOME/.vscodium_scripts/updateVSCodium.sh'" >> $HOME/.bashrc echo "alias code='bash \$HOME/.vscodium_scripts/VSCodium.AppImage --no-sandbox > /dev/null 2>&1 &;disown'" >> $HOME/.bashrc echo "" >> $HOME/.bashrc - + # to .zshrc if exists if [ -f $HOME/.zshrc ] ; then echo "" >> $HOME/.zshrc @@ -43,14 +43,11 @@ else # if the folder isn't already created (first run?) echo "alias code='bash \$HOME/.vscodium_scripts/VSCodium.AppImage --no-sandbox > /dev/null 2>&1 &;disown'" >> $HOME/.zshrc echo "" >> $HOME/.zshrc fi - - # to config.fish if exists + + # if config.fish exists if [ -f $HOME/.config/fish/config.fish ] ; then - echo "" >> $HOME/.config/fish/config.fish - echo "# Abbrevations for Codium" >> $HOME/.config/fish/config.fish - echo "abbr updateCodium 'bash \$HOME/.vscodium_scripts/updateVSCodium.sh'" >> $HOME/.config/fish/config.fish - echo "abbr code 'bash \$HOME/.vscodium_scripts/VSCodium.AppImage --no-sandbox > /dev/null 2>&1 &;disown'" >> $HOME/.config/fish/config.fish - echo "" >> $HOME/.config/fish/config.fish + fish -c "abbr updateCodium 'bash \$HOME/.vscodium_scripts/updateVSCodium.sh'" + fish -c "abbr code 'bash \$HOME/.vscodium_scripts/VSCodium.AppImage --no-sandbox > /dev/null 2>&1 &;disown'" fi fi