zsh_command_not_found
raw| 1 | # (c) Zygmunt Krynicki 2007, |
| 2 | # Licensed under GPL, see COPYING for the whole text |
| 3 | # |
| 4 | # This script will look-up command in the database and suggest |
| 5 | # installation of packages available from the repository |
| 6 | |
| 7 | if [[ -x /usr/lib/command-not-found ]] ; then |
| 8 | if (( ! ${+functions[command_not_found_handler]} )) ; then |
| 9 | function command_not_found_handler { |
| 10 | [[ -x /usr/lib/command-not-found ]] || return 1 |
| 11 | /usr/lib/command-not-found -- ${1+"$1"} && : |
| 12 | } |
| 13 | fi |
| 14 | fi |