]> arthur.barton.de Git - ax-zsh.git/blobdiff - default_plugins/correction/correction.zshrc
correction: Ignore pgrep and pkill
[ax-zsh.git] / default_plugins / correction / correction.zshrc
index 3f222499277a259783a3dbadd0fb04654b9d13dd..e58139f1e5fa8866f58e85b1995b5f12b1f3fd66 100644 (file)
@@ -1,6 +1,21 @@
 # AX-ZSH: Alex' Modular ZSH Configuration
 # correction.zshrc: Setup correction
 
+# Always-available commands, for example shell bultin. No need to check for
+# existence, always define "nocorrect alias".
+for cmd (
+       alias
+       command
+       echo
+       print
+       printf
+       type
+       which
+); do
+       alias $cmd="nocorrect $cmd"
+done
+
+# Optional commands, check for existence first before creating the alias!
 for cmd (
        apt
        aptitude
@@ -11,7 +26,9 @@ for cmd (
        mkdir
        mv
        mysql
+       pgrep
        pkg_add
+       pkill
        sudo
 ); do
        [[ -n $commands[$cmd] ]] \
@@ -21,3 +38,5 @@ done
 setopt correct_all
 
 SPROMPT="$ZSH_NAME: Correct \"$fg[yellow]%R$reset_color\" to \"$fg[green]%r$reset_color\" [$fg_bold[white]nyae$reset_color]? "
+
+unset cmd