Zsh (Shell)

Environnement

Installation

Installer Zsh :

apt install zsh fonts-powerline

Installer le framework Oh-My-Zsh :

sh -c "$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

Lancer Zsh :

zsh

Configurer Zsh en modifiant le fichier ~/.zshrc (thème, alias, taille de l'historique) :

nano ~/.zshrc
    ZSH_THEME="agnoster"

    alias up='sudo apt-get update && sudo apt-get dist-upgrade && sudo apt-get autoremove && sudo apt-get autoclean && sudo apt-get clean && sudo snap refresh && flatpak update -y'
    alias vpnon='sudo protonvpn-cli -connect'
    alias vpnoff='sudo protonvpn-cli -disconnect'
    alias nano='nano -c -l'
    alias du10='du -hsx * | sort -rh | head -10'
    alias meteo='curl wttr.in/paimpol'

    # Keep 100000 lines of history within the shell and save it to ~/.zsh_history:
    HISTSIZE=100000
    SAVEHIST=100000
    HISTFILE=~/.zsh_history

Recharger le fichier ~/.zshrc :

source ~/.zshrc

Définir Zsh comme shell par défaut :

chsh -s /bin/zsh

Sources

https://www.it-connect.fr/passer-de-bash-a-zsh/

https://github.com/ohmyzsh/ohmyzsh