gnu_linux_config:conf_zsh
                Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| gnu_linux_config:conf_zsh [2012/01/31 23:54] – Utilisation d'une image dans le namespace guillaume | gnu_linux_config:conf_zsh [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Configuration de zsh ====== | ||
| - | **zsh** est un shell différent qui est très apprécié pour plusieurs fonctionnalités dont ils disposent telles que l' | ||
| - | <code bash> | ||
| - | |||
| - | La configuration suivante permet d' | ||
| - | |||
| - | < | ||
| - | READNULLCMD=${PAGER: | ||
| - | |||
| - | if [[ " | ||
| - | [[ -z " | ||
| - | [[ -z " | ||
| - | [[ -z " | ||
| - | [[ -z " | ||
| - | [[ -z " | ||
| - | [[ -z " | ||
| - | [[ -z " | ||
| - | [[ -z " | ||
| - | |||
| - | [[ -z " | ||
| - | [[ -z " | ||
| - | [[ -z " | ||
| - | [[ -z " | ||
| - | [[ -z " | ||
| - | [[ -z " | ||
| - | |||
| - | # ncurses fogyatekos | ||
| - | [[ " | ||
| - | [[ " | ||
| - | [[ " | ||
| - | [[ " | ||
| - | [[ " | ||
| - | [[ " | ||
| - | [[ " | ||
| - | [[ " | ||
| - | fi | ||
| - | |||
| - | zstyle ': | ||
| - | / | ||
| - | |||
| - | unalias run-help | ||
| - | autoload run-help | ||
| - | |||
| - | # If you don't want compinit called here, place the line | ||
| - | # skip_global_compinit=1 | ||
| - | # in your $ZDOTDIR/ | ||
| - | if [[ -z " | ||
| - | autoload -U compinit | ||
| - | compinit | ||
| - | fi | ||
| - | |||
| - | ## Aliases | ||
| - | alias ls='ls --color=auto ' | ||
| - | alias ll='ls -l' | ||
| - | alias la='ls -a' | ||
| - | alias lL='ls -la' | ||
| - | alias cp='cp -i' | ||
| - | alias mv='mv -i' | ||
| - | alias rm='rm -i' | ||
| - | alias less=' | ||
| - | alias myip4=" | ||
| - | alias myip6=" | ||
| - | alias aaa=" | ||
| - | |||
| - | ## Term Title display | ||
| - | if [ " | ||
| - | |||
| - | ## Keybindings and Prompt | ||
| - | # Lookup in / | ||
| - | # by typing ^v and then type the key or key combination you want to use. | ||
| - | # "man zshzle" | ||
| - | bindkey ' | ||
| - | bindkey ' | ||
| - | bindkey ' | ||
| - | bindkey ' | ||
| - | bindkey ' | ||
| - | bindkey ' | ||
| - | bindkey ' | ||
| - | bindkey ' | ||
| - | bindkey ' | ||
| - | |||
| - | # Linux console, screen or rxvt. | ||
| - | if [ " | ||
| - | then | ||
| - | bindkey ' | ||
| - | bindkey ' | ||
| - | fi | ||
| - | |||
| - | # xterm | ||
| - | if [ " | ||
| - | then | ||
| - | bindkey ' | ||
| - | bindkey ' | ||
| - | bindkey ' | ||
| - | bindkey ' | ||
| - | fi | ||
| - | |||
| - | # Colorized prompt. Root and normal users have different colors. | ||
| - | if [ "`id -u`" -eq 0 ]; then | ||
| - | export PS1=" | ||
| - | export HISTFILE=/ | ||
| - | else | ||
| - | export PS1=" | ||
| - | export HISTFILE=$HOME/ | ||
| - | fi | ||
| - | |||
| - | # Color Management for the `ls` command | ||
| - | if [ -x / | ||
| - | then | ||
| - | if [ -r ~/ | ||
| - | then | ||
| - | eval " | ||
| - | elif [ -r / | ||
| - | then | ||
| - | eval " | ||
| - | else | ||
| - | eval " | ||
| - | fi | ||
| - | fi | ||
| - | |||
| - | ## ZSH specific settings | ||
| - | # man zshoptions | ||
| - | setopt correct | ||
| - | setopt print_exit_value # print return value if non-zero | ||
| - | unsetopt beep # no bell on error | ||
| - | unsetopt clobber | ||
| - | unsetopt hist_beep | ||
| - | unsetopt ignore_eof | ||
| - | unsetopt list_beep | ||
| - | unsetopt rm_star_silent # ask for confirmation for `rm *' or `rm path/ | ||
| - | |||
| - | # Completion style | ||
| - | unsetopt list_ambiguous # ?? | ||
| - | |||
| - | # Completion options | ||
| - | # man zshoptions | ||
| - | setopt auto_cd | ||
| - | setopt auto_pushd | ||
| - | setopt auto_remove_slash | ||
| - | setopt chase_links | ||
| - | setopt extended_glob | ||
| - | setopt glob_dots | ||
| - | setopt pushd_ignore_dups | ||
| - | setopt pushd_silent | ||
| - | setopt pushd_to_home | ||
| - | unsetopt bg_nice | ||
| - | unsetopt hup # no hup signal at shell exit | ||
| - | |||
| - | zstyle ': | ||
| - | zstyle ': | ||
| - | zstyle ': | ||
| - | zstyle ': | ||
| - | |||
| - | HOSTS=(.trinaps.net .trinaps.com) | ||
| - | zstyle ': | ||
| - | |||
| - | autoload -U compinit | ||
| - | compinit | ||
| - | |||
| - | ## History settings | ||
| - | export HISTORY=10000 | ||
| - | export HISTSIZE=10000 | ||
| - | export SAVEHIST=8000 | ||
| - | setopt extended_history | ||
| - | setopt hist_ignore_all_dups # no duplicate | ||
| - | setopt hist_ignore_space | ||
| - | setopt hist_verify | ||
| - | setopt inc_append_history | ||
| - | setopt share_history | ||
| - | |||
| - | ## Exports | ||
| - | export LANG=" | ||
| - | export LANGUAGE=" | ||
| - | export LC_CTYPE=" | ||
| - | export LC_NUMERIC=" | ||
| - | export LC_TIME=" | ||
| - | export LC_COLLATE=" | ||
| - | export LC_MONETARY=" | ||
| - | export LC_MESSAGES=" | ||
| - | export LC_PAPER=" | ||
| - | export LC_NAME=" | ||
| - | export LC_ADDRESS=" | ||
| - | export LC_TELEPHONE=" | ||
| - | export LC_MEASUREMENT=" | ||
| - | export LC_IDENTIFICATION=" | ||
| - | export LC_ALL=" | ||
| - | export EDITOR="/ | ||
| - | export PATH=/ | ||
| - | </ | ||
| - | |||
| - | Une fois la configuration faite, on peut changer de shell avec la commande **chsh**. | ||
| - | <code bash> | ||
| - | Mot de passe : | ||
| - | Changement d' | ||
| - | Entrez la nouvelle valeur ou « Entrée » pour conserver la valeur proposée | ||
| - | Interpréteur de commandes initial [/bin/zsh]: / | ||
| - | |||
| - | Au final, on a quelque chose de ce genre. | ||
| - | {{ : | ||
gnu_linux_config/conf_zsh.1328054078.txt.gz · Last modified: 2021/01/04 20:40 (external edit)
                
                