Fix command not found handler for ubuntu

This commit is contained in:
ItsDrike 2021-01-28 13:53:52 +01:00
parent 70e75ef8dc
commit 617125deda
No known key found for this signature in database
GPG key ID: 252D306F545351FC

View file

@ -26,8 +26,8 @@ if command -v pkgfile > /dev/null; then
elif [ -x /usr/lib/command-not-found -o -x /usr/share/command-not-found/command-not-found ]; then elif [ -x /usr/lib/command-not-found -o -x /usr/share/command-not-found/command-not-found ]; then
# Ubuntu handle for bash default command-not-found # Ubuntu handle for bash default command-not-found
# it works similarely to the above arch alternative, # it works similarely to the above arch alternative,
# this is a clone of the original bash implementation # this is based on the original bash implementation
function command_not_found_handle { command_not_found_handler() {
# check because cmd not found could've been removed in the meantime # check because cmd not found could've been removed in the meantime
if [ -x /usr/lib/command-not-found ]; then if [ -x /usr/lib/command-not-found ]; then
/usr/lib/command-not-found -- "$1" /usr/lib/command-not-found -- "$1"