All patches and comments are welcome. Please squash your changes to logical
commits before using git-format-patch and git-send-email to
patches@git.madduck.net.
If you'd read over the Git project's submission guidelines and adhered to them,
I'd be especially grateful.
3 # Configures the completions system
5 # Copyright © 1994–2008 martin f. krafft <madduck@madduck.net>
6 # Released under the terms of the Artistic Licence 2.0
8 # Source repository: git://git.madduck.net/etc/zsh.git
11 # automatically list choices on an ambiguous completion
14 # use menu after the second completion request
17 # recognise exact matches even if they're ambiguous
20 # move cursor to end of word being completed
23 # correct the command if mistyped
26 # correct all arguments, not just the command
29 # be magic about adding/removing final characters on tab completion
30 setopt auto_param_keys auto_param_slash auto_remove_slash
32 # load fancy completion list and menu handler
35 # initialise the completion system
37 compinit -d $ZVARDIR/comp-$HOST
40 zstyle ':completion:*' use-cache on
41 zstyle ':completion:*' cache-path $ZVARDIR/compcache
43 #zstyle ':completion:*' completer _list _expand _complete _ignored _match _correct _approximate _prefix
44 zstyle ':completion:*' completer _complete _ignored _match _correct _approximate
46 # allow cursor-key navigation through completion set
47 zstyle ':completion:*:*:*:*' menu select
49 # use colours in completion lists and menus
50 zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
52 # ignore working and backup copies, and compiled objects
53 zstyle ':completion:*:(all-|)files' ignored-patterns \
54 '*.bk' '*.bak' '*.old' '*~' '.*.sw?' '*.o' '*.pyc'
56 zstyle -e ':completion:*:approximate:*' max-errors 'reply=($((($#PREFIX+$#SUFFIX)/3)) not-numeric )'
57 zstyle -e ':completion:*:correct:*' max-errors 'reply=($((($#PREFIX+$#SUFFIX)/2)) numeric )'
58 #zstyle ':completion:*:correct:::' max-errors 1 not-numeric
59 #zstyle ':completion:*:approximate:::' max-errors 2 numeric
61 #zstyle ':completion:*' list-suffixes true
62 #zstyle ':completion:*' match-original both
63 #zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}'
64 #zstyle ':completion:*:match:*' original only
65 #zstyle ':completion:*' original true
66 #zstyle ':completion:*' squeeze-slashes true
68 # functions which start with _ are internal and ignored
69 zstyle ':completion:*:functions' ignored-patterns '_*'
71 # do not offer files already specified on the line
72 zstyle ':completion:*:rm:*' ignore-line yes
74 #zstyle ':completion:*:*:-subscript-:*' tag-order indexes parameters
75 #zstyle ':completion::*:(-command-|export):*' fake-parameters ${${${_comps[(I)-value-*]#*,}%%,*}:#-*-}
77 # ignore current directory when completing in ../
78 #zstyle ':completion:*:cd:*' ignore-parents parent pwd
79 zstyle ':completion:*' ignore-parents parent pwd
81 # http://xana.scru.org/2005/08/20#ignorelatexjunk
82 zstyle -e ':completion:*:*:vim#:*:*' ignored-patterns \
83 'texfiles=$(echo ${PREFIX}*.tex); [[ -n "$texfiles" ]] &&
84 reply=(*.(aux|dvi|log|ps|pdf|bbl|toc|lot|lof|latexmain)) || reply=()'
86 # http://madism.org/~madcoder/dotfiles/zsh/40_completion
87 zstyle ':completion:*:processes' command 'ps -au$USER -o pid,time,cmd|grep -v "ps -au$USER -o pid,time,cmd"'
88 zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)[ 0-9:]#([^ ]#)*=01;30=01;31=01;38'
90 zstyle :compinstall filename '$ETC/zsh/compsys'
92 # commands that take commands as arguments
93 compdef _precommand gdb
94 compdef _precommand nohup
95 compdef _precommand strace
97 zstyle ':completion:*' verbose yes
98 zstyle ':completion:*:descriptions' format '%B%d%b'
99 zstyle ':completion:*:messages' format '%d'
100 zstyle ':completion:*:warnings' format 'no matches for: %d'
101 zstyle ':completion:*' group-name ''