On Tue, Aug 03, 2021 at 09:26:32AM -0400, Chet Ramey (chet.ramey@case.edu)
wrote:
On 8/3/21 3:05 AM, Tapani Tarvainen wrote:
Right: command_not_found_handle() is not called when there's a slash
in the command.
Offhand I can't any reason why it shouldn't, but making that happen
would mean modifying bash source code. A wishlist item, then.
It doesn't because there's no point: a slash in the command name means
the shell doesn't look for it in $PATH. It's a filesystem path.
Well, yes, except when someone wants to (ab)use
command_not_found_handle() to catch things that are not parsed as
command names to handle them in non-standard ways, like the original
poster tried to do here.