diff options
| author | Anton Bobov <bobov_a@sibsac.ru> | 2011-10-13 11:17:19 +0600 |
|---|---|---|
| committer | Anton Bobov <bobov_a@sibsac.ru> | 2011-10-13 11:17:19 +0600 |
| commit | da709cd9e90c3ab644bb92700f0ed40d965b80d3 (patch) | |
| tree | 144e5470327f72b8489141cd7595b652c6c32616 /files/.zsh/rc/S40_completion | |
Initial commit.
Diffstat (limited to 'files/.zsh/rc/S40_completion')
| -rwxr-xr-x | files/.zsh/rc/S40_completion | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/files/.zsh/rc/S40_completion b/files/.zsh/rc/S40_completion new file mode 100755 index 0000000..dc58319 --- /dev/null +++ b/files/.zsh/rc/S40_completion @@ -0,0 +1,43 @@ +zstyle ':completion:*' add-space true +zstyle ':completion:*' completer _expand _complete _match _prefix _approximate _list +zstyle ':completion:*' menu select=1 +zstyle ':completion:*' file-sort name +zstyle ':completion:*' list-colots ${(s.:.)ZLS_COLORS} +zstyle ':completion:*' menu select +zstyle ':completion:*:approximate:*' max-errors 'reply=( $(( ($#PREFIX+$#SUFFIX)/3 )) numeric )' + +# {{{ Formats +zstyle ':completion:*' group 1 +zstyle ':completion:*' format '%B---- %d%b' +zstyle ':completion:*:corrections' format '%B---- %d (errors %e)%b' +zstyle ':completion:*:descriptions' format '%B---- %d%b' +zstyle ':completion:*:messages' format '%B%U---- d%u%b' +zstyle ':completion:*:warnings' format "%B$fg[red]%}---- no match for: $fg[white]%d%b" +zstyle ':completion:*' group-name '' +# }}} + +# {{{ Kill +zstyle ':completion:*:processes' command 'ps -au$USER -o pid,time,cmd | grep -v "ps -au$USER -o pid,time,cmd"' +zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)[ 0-9:]##([^ ]#)*=01;30=01;31=01;38' +# }}} + +# {{{ Host and users +hosts=($( ( \ + ( [ -r ~/.ssh/config ] && awk '/^host +[a-z]/ { print $2 }' ~/.ssh/config) ; \ + ( [ -r ~/.ssh/known_hosts ] && awk '{print $1}' ~/.ssh/known_hosts | tr , '\n') \ + ) | sort -u)) +zstyle ':completion:*' hosts $hosts +zstyle ':completion:*:hosts' list-colors '=(#b)(*)(bobov.name)=01;30=01;31' '=[^.]#=01;31' + +users=(root dexter) +zstyle ':completion:*' users $users + +# }}} + +# Ignore for vim +zstyle ':completion:*:*:vi(m|):*:*files' ignored-patterns '*?.(aux|dvi|ps|pdf|bbl|toc|lot|lof|o|cm?|class|py[oc])' + + + + +# vim: et ft=zsh fdm=marker : |
