suggest-command-not-found crates.io version crates.io downloads

Typo correction for not-found shell commands

ScreenShot

Usage

  1. Install suggest-command-not-found console $ cargo install suggest-command-not-found
  2. Add command_not_found_handler to your ~/.zshrc zsh command_not_found_handler() { if command -v suggest-command-not-found &> /dev/null; then exec suggest-command-not-found $@ else echo "zsh: command not found: $@" fi } Or update your ~/.bash_profile if you are using Bash: bash command_not_found_handle() { if command -v suggest-command-not-found &> /dev/null; then exec suggest-command-not-found $@ else echo "bash: command not found: $@" fi }
  3. 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 ```