Typo correction for shell commands when command not found
suggest-command-not-found
console
$ cargo install suggest-command-not-found
command_not_found_handler
to your ~/.zshrc
zsh
command_not_found_handler() {
exec suggest-command-not-found $@
}
Or update your ~/.bash_profile
if you are using Bash:
bash
command_not_found_handle() {
exec suggest-command-not-found $@
}
Make a typo ```console $ carog new mypj Error: command not found: "carog" new mypj ==> Did you mean "cargo"?
$ notacommand Error: command not found: "notacommand"
$ echo $? 127 ```