Last active
December 30, 2018 22:38
-
-
Save daktak/10232198 to your computer and use it in GitHub Desktop.
zshrc from system rescue cd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# This file is based on the configuration written by | |
# Bruno Bonfils, <asyd@debian-fr.org> | |
# Written since summer 2001 | |
# colors | |
eval `dircolors /etc/DIR_COLORS` | |
autoload -U zutil | |
autoload -U compinit | |
autoload -U complist | |
bindkey '\e[A' history-search-backward | |
bindkey '\e[B' history-search-forward | |
bindkey '^K' kill-whole-line | |
bindkey "\e[H" beginning-of-line # Home (xorg) | |
bindkey "\e[1~" beginning-of-line # Home (console) | |
bindkey "\e[4~" end-of-line # End (console) | |
bindkey "\e[F" end-of-line # End (xorg) | |
bindkey "\e[2~" overwrite-mode # Ins | |
bindkey "\e[3~" delete-char # Delete | |
bindkey '\eOH' beginning-of-line | |
bindkey '\eOF' end-of-line | |
# Activation | |
compinit | |
alias mydf="df -hPT | column -t" | |
alias ll="ls -lah" | |
alias rm="rm -i" | |
alias cp="cp -i" | |
alias ls="ls --color=auto" | |
alias l="ls -ail" | |
alias cl="clear" | |
alias reboot="shutdown -r now" | |
# do a du -hs on each dir on current path | |
alias lsdir="for dir in *;do;if [ -d \$dir ];then;du -hsL \$dir;fi;done" | |
# case-insensitive (uppercase from lowercase) completion | |
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}' | |
# process completion | |
zstyle ':completion:*:processes' command 'ps -au$USER' | |
zstyle ':completion:*:*:kill:*:processes' list-colors "=(#b) #([0-9]#)*=36=31" | |
# zstyle | |
zstyle ':completion:*' completer _expand _complete _ignored | |
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS} | |
zstyle ':completion:*' menu select=2 | |
zstyle ':completion:*' select-prompt '%SScrolling active: current selection at %p%s' | |
zstyle ':completion:*:descriptions' format '%U%F{yellow}%d%f%u' | |
#environement variables | |
export HISTSIZE=512 | |
setopt CORRECT | |
setopt ALWAYS_TO_END | |
setopt NOTIFY | |
setopt NOBEEP | |
setopt AUTOLIST | |
setopt AUTOCD | |
setopt PRINT_EIGHT_BIT | |
# for have colors | |
autoload -U colors | |
colors | |
# define your colors here (i hate white background) | |
host_color="green" | |
path_color="blue" | |
date_color="white" | |
host="%{$fg[$host_color]%}%n@%m" | |
cpath="%B%{$fg[$path_color]%}%/%b" | |
end="%{$reset_color%}%% " | |
PS1="$host $cpath $end" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment