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 zstyle :compinstall filename '$ZDOTDIR/zshrc/20_compsys'
13 # automatically list choices on an ambiguous completion
16 # use menu after the second completion request
19 # recognise exact matches even if they're ambiguous
22 # move cursor to end of word being completed
25 # correct the command if mistyped
28 # correct all arguments, not just the command
31 # be magic about adding/removing final characters on tab completion
32 setopt auto_param_keys auto_param_slash auto_remove_slash
34 # load fancy completion list and menu handler
37 # initialise the completion system
39 compinit -d $ZVARDIR/comp-$HOST
42 zstyle ':completion:*' use-cache on
43 zstyle ':completion:*' cache-path $ZVARDIR/compcache
45 #zstyle ':completion:*' completer _list _expand _complete _ignored _match _correct _approximate _prefix
46 zstyle ':completion:*' completer _complete _ignored _match _correct _approximate
48 # allow cursor-key navigation through completion set
49 zstyle ':completion:*:*:*:*' menu select
51 # use colours in completion lists and menus
52 zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
54 # ignore working and backup copies, and compiled objects
55 zstyle ':completion:*:(all-|)files' ignored-patterns \
56 '*.bk' '*.bak' '*.old' '*~' '.*.sw?' '*.o' '*.pyc'
58 zstyle -e ':completion:*:approximate:*' max-errors 'reply=($((($#PREFIX+$#SUFFIX)/3)) not-numeric )'
59 zstyle -e ':completion:*:correct:*' max-errors 'reply=($((($#PREFIX+$#SUFFIX)/2)) numeric )'
60 #zstyle ':completion:*:correct:::' max-errors 1 not-numeric
61 #zstyle ':completion:*:approximate:::' max-errors 2 numeric
63 #zstyle ':completion:*' list-suffixes true
64 #zstyle ':completion:*' match-original both
65 #zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}'
66 #zstyle ':completion:*:match:*' original only
67 #zstyle ':completion:*' original true
68 #zstyle ':completion:*' squeeze-slashes true
70 # functions which start with _ are internal and ignored
71 zstyle ':completion:*:functions' ignored-patterns '_*'
73 # do not offer files already specified on the line
74 zstyle ':completion:*:rm:*' ignore-line yes
76 #zstyle ':completion:*:*:-subscript-:*' tag-order indexes parameters
77 #zstyle ':completion::*:(-command-|export):*' fake-parameters ${${${_comps[(I)-value-*]#*,}%%,*}:#-*-}
79 # ignore current directory when completing in ../
80 #zstyle ':completion:*:cd:*' ignore-parents parent pwd
81 zstyle ':completion:*' ignore-parents parent pwd
83 # http://xana.scru.org/2005/08/20#ignorelatexjunk
84 zstyle -e ':completion:*:*:vim#:*:*' ignored-patterns \
85 'texfiles=$(echo ${PREFIX}*.tex); [[ -n "$texfiles" ]] &&
86 reply=(*.(aux|dvi|log|ps|pdf|bbl|toc|lot|lof|latexmain)) || reply=()'
88 # http://madism.org/~madcoder/dotfiles/zsh/40_completion
89 zstyle ':completion:*:processes' command 'ps -au$USER -o pid,time,cmd|grep -v "ps -au$USER -o pid,time,cmd"'
91 # commands that take commands as arguments
92 compdef _precommand gdb
93 compdef _precommand nohup
94 compdef _precommand strace
96 zstyle ':completion:*' verbose yes
97 zstyle ':completion:*:descriptions' format '%B%d%b'
98 zstyle ':completion:*:messages' format '%d'
99 zstyle ':completion:*:warnings' format 'no matches for: %d'
100 zstyle ':completion:*' group-name ''
103 zstyle :completion::complete:xmms2:\*:values list-grouped false
104 zstyle :completion::complete:xmms2:\*:values sort false