50 lines
2.3 KiB
Bash
50 lines
2.3 KiB
Bash
#!/usr/bin/false
|
||
|
||
#setopt autocd # change directory just by typing its name
|
||
#setopt correct # auto correct mistakes
|
||
setopt interactivecomments # allow comments in interactive mode
|
||
setopt magicequalsubst # enable filename expansion for arguments of the form ‘anything=expression’
|
||
setopt nonomatch # hide error message if there is no match for the pattern
|
||
setopt notify # report the status of background jobs immediately
|
||
setopt numericglobsort # sort filenames numerically when it makes sense
|
||
setopt promptsubst # enable command substitution in prompt
|
||
color_prompt=yes # enable colors
|
||
WORDCHARS=${WORDCHARS//\/} # Don't consider certain characters part of the word
|
||
PROMPT_EOL_MARK="" # hide EOL sign ('%')
|
||
|
||
# enable completion features
|
||
autoload -Uz compinit
|
||
compinit -d ~/.cache/zcompdump
|
||
zstyle ':completion:*:*:*:*:*' menu select
|
||
zstyle ':completion:*' auto-description 'specify: %d'
|
||
zstyle ':completion:*' completer _expand _complete
|
||
zstyle ':completion:*' format 'Completing %d'
|
||
zstyle ':completion:*' group-name ''
|
||
zstyle ':completion:*' list-colors ''
|
||
zstyle ':completion:*' list-prompt %SAt %p: Hit TAB for more, or the character to insert%s
|
||
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}'
|
||
zstyle ':completion:*' rehash true
|
||
zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s
|
||
zstyle ':completion:*' use-compctl false
|
||
zstyle ':completion:*' verbose true
|
||
zstyle ':completion:*:kill:*' command 'ps -u $USER -o pid,%cpu,tty,cputime,cmd'
|
||
zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}"
|
||
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31'
|
||
|
||
# History configurations
|
||
HISTFILE=~/.zsh_history
|
||
HISTSIZE=1000
|
||
SAVEHIST=2000
|
||
setopt hist_expire_dups_first # delete duplicates first when HISTFILE size exceeds HISTSIZE
|
||
setopt hist_ignore_dups # ignore duplicated commands history list
|
||
setopt hist_ignore_space # ignore commands that start with space
|
||
setopt hist_verify # show command with history expansion to user before running it
|
||
setopt share_history # share command history data
|
||
|
||
|
||
# configure `time` format
|
||
TIMEFMT=$'\nreal\t%E\nuser\t%U\nsys\t%S\ncpu\t%P'
|
||
|
||
# make less more friendly for non-text input files, see lesspipe(1)
|
||
#[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
|