X-Git-Url: https://arthur.barton.de/gitweb/?a=blobdiff_plain;f=default_plugins%2Fcorrection%2Fcorrection.zshrc;h=e58139f1e5fa8866f58e85b1995b5f12b1f3fd66;hb=a60487cc7c96408f8e7d8e758668b9b109636d00;hp=3f222499277a259783a3dbadd0fb04654b9d13dd;hpb=c4bb8fce15f895b60040963a083fde2822929ab5;p=ax-zsh.git diff --git a/default_plugins/correction/correction.zshrc b/default_plugins/correction/correction.zshrc index 3f22249..e58139f 100644 --- a/default_plugins/correction/correction.zshrc +++ b/default_plugins/correction/correction.zshrc @@ -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