Advertisement
v1ral_ITS

command_not_found handler

Apr 18th, 2019
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.64 KB | None | 0 0
  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 --no-failure-msg -- ${1+"$1"} && :
  12.         }
  13.     fi
  14. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement