|
Revision 3484, 1.1 kB
(checked in by kan, 5 years ago)
|
|
added kan's dotfiles
|
| Line | |
|---|
| 1 | # kan's .zshrc |
|---|
| 2 | |
|---|
| 3 | stty stop undef |
|---|
| 4 | |
|---|
| 5 | bindkey -e |
|---|
| 6 | |
|---|
| 7 | HISTFILE=$HOME/.zsh-history |
|---|
| 8 | HISTSIZE=1000 |
|---|
| 9 | SAVEHIST=1000 |
|---|
| 10 | setopt extended_history |
|---|
| 11 | SHELL=/usr/bin/zsh |
|---|
| 12 | |
|---|
| 13 | autoload -U compinit |
|---|
| 14 | compinit |
|---|
| 15 | |
|---|
| 16 | setopt autopushd print_eight_bit |
|---|
| 17 | setopt auto_menu auto_cd correct auto_name_dirs auto_remove_slash |
|---|
| 18 | setopt extended_history hist_ignore_dups hist_ignore_space prompt_subst |
|---|
| 19 | setopt pushd_ignore_dups rm_star_silent sun_keyboard_hack |
|---|
| 20 | setopt extended_glob list_types no_beep always_last_prompt |
|---|
| 21 | setopt cdable_vars sh_word_split auto_param_keys |
|---|
| 22 | unsetopt promptcr |
|---|
| 23 | zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS} |
|---|
| 24 | zstyle ':completion:*:default' menu select=1 |
|---|
| 25 | zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}' |
|---|
| 26 | |
|---|
| 27 | alias ls='\ls --color' |
|---|
| 28 | alias s='ls' |
|---|
| 29 | alias l='ls' |
|---|
| 30 | alias sl='ls' |
|---|
| 31 | alias la='ls -a' |
|---|
| 32 | alias ll='ls -l' |
|---|
| 33 | alias llh='ls -lh' |
|---|
| 34 | if [ -e '/usr/local/bin/gls' ]; then |
|---|
| 35 | alias ls='\gls --color' |
|---|
| 36 | fi |
|---|
| 37 | |
|---|
| 38 | setopt prompt_subst |
|---|
| 39 | if [ "$TERM" = "dumb" ] ; then |
|---|
| 40 | PROMPT='%h %n@%m[%d] %# ' |
|---|
| 41 | RPROMPT='%D %T' |
|---|
| 42 | else |
|---|
| 43 | PROMPT=$'%{\e[34m%}%U%B$HOST'"{`whoami`}%b%%%u " |
|---|
| 44 | RPROMPT=$'%{\e[33m%}[%d] %D %T%{\e[m%}' |
|---|
| 45 | fi |
|---|
| 46 | |
|---|
| 47 | alias lv='w3m' |
|---|
| 48 | alias less='w3m' |
|---|
| 49 | export EDITOR=vim |
|---|
| 50 | alias vi=vim |
|---|
| 51 | |
|---|