-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Labels
Milestone
Description
When encountering an unknown command fish defers to different handlers.
In #365 it was changed that these handlers receive all of $argv though that was quickly reverted as some handlers are unable to cope with that (3559f20 and 7a1fc02).
Some handlers like PackageKit however are able to deal with them and properly pass them along when executing the fixed commands.
~ $ grep SingleMatch /etc/PackageKit/CommandNotFound.conf # this is just for demonstration
SingleMatch=ask
~ $ /usr/libexec/pk-command-not-found mna --version
fish: mna: command not found...
Run similar command: man [Y/n] y
man 2.9.4
~ $ mna --version
fish: mna: command not found...
Run similar command: man [Y/n] y
What manual page do you want?
For example, try 'man man'.
~ [127]$ function fish_command_not_found
/usr/libexec/pk-command-not-found $argv
end
~ $ mna --version
fish: mna: command not found...
Run similar command: man [Y/n] y
man 2.9.4After looking at the current implementation I overwrote the function and everything still worked flawlessly.
I think it would be best to change this for the PackageKit handler.
Version: 3.3.1
Reactions are currently unavailable