better use of abbr for fish

This commit is contained in:
Mylloon 2021-11-14 19:55:23 +01:00
parent 0af41d160d
commit 562db55e3e
3 changed files with 23 additions and 24 deletions

View file

@ -8,28 +8,6 @@ set -x MANPAGER "sh -c 'col -bx | batcat -l man -p'"
# SSH # SSH
fish_ssh_agent fish_ssh_agent
# Shortcuts
abbr ls 'ls -lh'
abbr cp 'cp -r'
abbr rm 'rm -rf'
abbr gcc 'gcc -Wall -Wextra -fanalyzer -g'
abbr activate 'source bin/activate.fish'
# abbr sugit 'sudo "GIT_SSH_COMMAND=exec sudo -Hu $LOGNAME SSH_AUTH_SOCK=$SSH_AUTH_SOCK ssh" git'
# abbr sugitfix 'sudo git config core.autocrlf true && sudo git config core.filemode false'
abbr vs 'code .'
abbr untgz 'tar -xvzf'
abbr cd.. 'cd ..'
# Exclu Linux
abbr bigupdate 'sudo apt update && sudo apt upgrade -y && sudo apt autoremove -y && sudo snap refresh'
# && sudo flatpak update'
abbr d 'nautilus . > /dev/null 2>&1 &;disown'
abbr spotify 'LD_PRELOAD=/usr/local/lib/spotify-adblock.so spotify > /dev/null 2>&1 &;disown'
# Exclu WSL
# abbr bigupdate 'sudo apt update && sudo apt upgrade -y && sudo apt autoremove -y && sudo do-release-upgrade'
# abbr d 'explorer.exe .'
# Exclu fac
# abbr bocal 'ssh bocal -t sh'
# GL4Dummies # GL4Dummies
set -gx PATH $HOME/local/bin $PATH set -gx PATH $HOME/local/bin $PATH
set -gx LD_LIBRARY_PATH $HOME/local/lib $LD_LIBRARY_PATH set -gx LD_LIBRARY_PATH $HOME/local/lib $LD_LIBRARY_PATH

View file

@ -46,4 +46,23 @@ fish -c 'set -U fish_pager_color_description B3A06D yellow'
fish -c 'set -U fish_pager_color_prefix normal --bold --underline' fish -c 'set -U fish_pager_color_prefix normal --bold --underline'
fish -c 'set -U fish_pager_color_progress brwhite --background=cyan' fish -c 'set -U fish_pager_color_progress brwhite --background=cyan'
# Adding abbrevations
abbr ls 'ls -lh'
abbr cp 'cp -r'
abbr rm 'rm -rf'
abbr gcc 'gcc -Wall -Wextra -fanalyzer -g'
abbr activate 'source bin/activate.fish'
abbr vs 'code .'
abbr untgz 'tar -xvzf'
abbr cd.. 'cd ..'
if grep "WSL" /proc/version > /dev/null; # Only for WSL
then
abbr bigupdate 'sudo apt update && sudo apt upgrade -y && sudo apt autoremove -y && sudo do-release-upgrade'
abbr d 'explorer.exe .'
else # if regular distro (i.e. Ubuntu)
abbr bigupdate 'sudo apt update && sudo apt upgrade -y && sudo apt autoremove -y && sudo snap refresh'
abbr d 'nautilus . > /dev/null 2>&1 &;disown'
abbr spotify 'LD_PRELOAD=/usr/local/lib/spotify-adblock.so spotify > /dev/null 2>&1 &;disown'
fi
echo "You must log out to finish applying the changes." echo "You must log out to finish applying the changes."

View file

@ -69,8 +69,10 @@ then
echo "" echo ""
echo "" echo ""
echo "Take care, by default the fish configuration is set for Ubuntu, you may need to comment and uncomment" echo "Take care, by default the fish configuration is set for Ubuntu, you may need to uncomment"
echo "some of the lines in $HOME/.config/fish/config.fish" echo "some of the lines in $HOME/.config/fish/config.fish to enable custom network disks from Windows."
echo ""
echo "The SU has also kept his password."
fi fi
# Supprime le repo # Supprime le repo