[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: command_not_found_handle not called if "command" includes a slash
From: |
Ken Irving |
Subject: |
Re: command_not_found_handle not called if "command" includes a slash |
Date: |
Tue, 29 Dec 2009 13:03:21 -0900 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
On Tue, Dec 29, 2009 at 10:40:04PM +0100, Jan Schampera wrote:
> Ken Irving schrieb:
>
> >> This patch is not sufficient, as it leaves the error message, but it
> >> does call the hook function in the problem cases:
>
> I'm just not sure if it makes sense. I mean, if the user requests the
> execution of a *specific file*, what should the hook function do if it
> fails?
That's up to that function to determine, since bash passes control over
to it. It should be able to handle whatever it gets. My use case is
to take things that look like 'object.method' -- which are not likely
to collide with normal executables -- and run them under a special handler.
That handler emits an error message and exit code if it can't make sense
of its argument.
Ken
--
Ken.Irving@alaska.edu