]> arthur.barton.de Git - ax-zsh.git/blob - default_plugins/correction/correction.zshrc
correction: Ignore pgrep and pkill
[ax-zsh.git] / default_plugins / correction / correction.zshrc
1 # AX-ZSH: Alex' Modular ZSH Configuration
2 # correction.zshrc: Setup correction
3
4 # Always-available commands, for example shell bultin. No need to check for
5 # existence, always define "nocorrect alias".
6 for cmd (
7         alias
8         command
9         echo
10         print
11         printf
12         type
13         which
14 ); do
15         alias $cmd="nocorrect $cmd"
16 done
17
18 # Optional commands, check for existence first before creating the alias!
19 for cmd (
20         apt
21         aptitude
22         brew
23         ebuild
24         gist
25         man
26         mkdir
27         mv
28         mysql
29         pgrep
30         pkg_add
31         pkill
32         sudo
33 ); do
34         [[ -n $commands[$cmd] ]] \
35                 && alias $cmd="nocorrect $cmd"
36 done
37
38 setopt correct_all
39
40 SPROMPT="$ZSH_NAME: Correct \"$fg[yellow]%R$reset_color\" to \"$fg[green]%r$reset_color\" [$fg_bold[white]nyae$reset_color]? "
41
42 unset cmd