|
1 |
|
2 compctl -g '.*(-/) *(-/)' cd pushd |
|
3 compctl -g '.*(-/) *(-/)' rmdir |
|
4 compctl -g '*.Z *.z *.gz *.tgz *(-/)' zcat gunzip |
|
5 compctl -g '*.Z *.z *.gz *.tgz *.tar *.bz2 *(-/)' tart tarx tar |
|
6 compctl -g '*.bz2 *(-/)' bz2cat bunzip2 |
|
7 compctl -g '*.zip *.ZIP *.exe *.EXE *(-/)' unzip |
|
8 compctl -g '*.ps *.ps.gz *(-/)' gs ghostview gv evince |
|
9 compctl -g '*.tex* *.latex* *(-/)' tex latex texi2dvi |
|
10 compctl -g '*.dvi *(-/)' xdvi dvips |
|
11 compctl -j -P % -x 's[-] p[1]' -k signals -- kill |
|
12 compctl -l '' nohup exec |
|
13 compctl -u -x 's[@]' -k hosts -- finger |
|
14 compctl -m info |
|
15 compctl -m -g '*.1 *(-/)' man |
|
16 compctl -c which where type |
|
17 compctl -g '*.pdf *(-/)' evince |
|
18 |
|
19 # Hosts completion |
|
20 |
|
21 if [ -f ~/.ssh/config ]; then |
|
22 hosts=($hosts `grep ^Host ~/.ssh/config | sed s/Host\ // | egrep -v '^\*$'`) |
|
23 fi |
|
24 if [ "$hosts" ]; then |
|
25 zstyle ':completion:*:hosts' hosts $hosts |
|
26 fi |
|
27 |
|
28 |
|
29 zstyle ':completion:*' completer _expand _complete _correct _approximate |
|
30 zstyle ':completion:*' completions 1 |
|
31 zstyle ':completion:*' format 'Completing %B%d%b%:' |
|
32 zstyle ':completion:*' glob 1 |
|
33 zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS} |
|
34 zstyle ':completion:*' list-prompt %SAt %p: Hit TAB for more, or the character to insert%s |
|
35 zstyle ':completion:*' max-errors 2 numeric |
|
36 zstyle ':completion:*' menu select=3 |
|
37 zstyle ':completion:*' prompt '%e erreur(s)...' |
|
38 zstyle ':completion:*' select-prompt '%SScrolling active: current selection at %p%s' |
|
39 zstyle ':completion:*' substitute 1 |
|
40 |
|
41 autoload -Uz compinit |
|
42 compinit |
|
43 |
|
44 # Needed for menuselect below |
|
45 zmodload zsh/complist |
|
46 |
|
47 autoload -U incremental-complete-word |
|
48 zle -N incremental-complete-word |
|
49 bindkey 'i' incremental-complete-word |
|
50 |
|
51 bindkey -M menuselect '' accept-and-infer-next-history |