====== zsh - ohmyzsh - Powerlevel10k ====== * Objet : Personnalisation du shell ZSH - ohmyzsh - Powerlevel10k * Niveau requis : {{tag>débutant avisé}} * Commentaires : // shell, goodies // * Débutant, à savoir : [[:doc:systeme:commandes:le_debianiste_qui_papillonne|Utiliser GNU/Linux en ligne de commande, tout commence là !.]] :-) ===== Introduction ===== Amélioration du shell zsh avec ohmyzsh et powerlevel10k, coloration syntaxique, suggestions des commandes depuis l'historique ... ===== Installation ===== ==== Prérequis ==== apt update && apt install git curl zsh fonts-powerline unzip ==== OhMyZsh ==== Récupération et installation du framework : sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" --info 'Do you want to change your default shell to zsh? [Y/n]' Y, Enter --info 'Mot de passe :' Mot de passe utilisateur (sudoers?), Enter === Plugin additionnel === //Prédiction basé sur les commandes contenu dans le .zsh_history :// git clone https://github.com/zsh-users/zsh-autosuggestions ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions //Coloration Syntaxique :// git clone https://github.com/zsh-users/zsh-syntax-highlighting ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting ==== PowerLevel10k ==== Récupération du thème : git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k ===== Configuration ===== ==== OhMyZsh ==== Aux choix de l'éditeur texte, par exemple avec nano : nano ~/.zshrc Ajouter ceci en première ligne : export TERM="xterm-256color" La section / lignes ZSH_THEME="xxx" est à remplacer par : ZSH_THEME="powerlevel10k/powerlevel10k" La section / lignes plugins=“xxx” est à remplacer par : plugins=( zsh-autosuggestions zsh-syntax-highlighting colored-man-pages git ) **-Prise en charge des glyphe :** wget https://github.com/ryanoasis/nerd-fonts/releases/download/v2.1.0/Hack.zip mkdir hack unzip Hack.zip -d hack mv hack /usr/share/fonts/truetype/ fc-cache -f -v Pensez à modifier la police par défaut de votre terminal ! ==== PowerLevel10k ==== A venir .. ===== Astuce ===== Prise en compte des modifications .zshrc : source ~/.zshrc