[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: feature request: file_not_found_handle()
From: |
Andreas Gregor Frank |
Subject: |
Re: feature request: file_not_found_handle() |
Date: |
Mon, 19 Aug 2013 12:57:56 +0200 |
Hi Chet,
I have no idea if there is "enough" demand, but i think there will be some
ideas to use this feature...
I still think it is a question of consistency to be able to handle a "No
such file or directory event", if i can do this with a "command not found
event" (independent of the command_not_found_handle history).
You say you can easily test whether or not if the file in the pathname
exists.
And Ken's recommendation to trigger a no_such_file_or_directory_handle() is
minimally invasive.
So why not ?
Andreas
*
*
*
*
**
2013/8/18 Chet Ramey <chet.ramey@case.edu>
> On 8/14/13 7:44 AM, Andreas Gregor Frank wrote:
> > Hi,
> >
> > i think a file_not_found_handle() or a modified
> command_not_found_handle(),
> > that does not need an unsuccessful PATH search to be triggered, would be
> > useful and consistent.
>
> The original rationale for command_not_found_handle is that there was no
> other way to determine whether a command could be found with a PATH search.
> (well, no easy way).
>
> A PATH search is suppressed when the command to be executed contains a
> slash: the presence of a slash indicates an absolute pathname that is
> directly passed to exec(). Since there's no search done, you know exactly
> which pathname you're attempting to execute, and you can easily test
> whether or not it exists and is executable.
>
> Is there enough demand to make this feature addition worthwhile?
>
> Chet
>
> --
> ``The lyf so short, the craft so long to lerne.'' - Chaucer
> ``Ars longa, vita brevis'' - Hippocrates
> Chet Ramey, ITS, CWRU chet@case.edu
> http://cnswww.cns.cwru.edu/~chet/
>
- Re: feature request: file_not_found_handle(), (continued)
- Re: feature request: file_not_found_handle(), Chet Ramey, 2013/08/18
- Re: feature request: file_not_found_handle(), Ken Irving, 2013/08/18
- Re: feature request: file_not_found_handle(), Linda Walsh, 2013/08/18
- Re: feature request: file_not_found_handle(), Ken Irving, 2013/08/18
- Re: feature request: file_not_found_handle(), Linda Walsh, 2013/08/19
- Re: feature request: file_not_found_handle(), Greg Wooledge, 2013/08/20
- Message not available
- Re: feature request: file_not_found_handle(), Greg Wooledge, 2013/08/20
- Re: feature request: file_not_found_handle(), Chet Ramey, 2013/08/20
- Re: feature request: file_not_found_handle(), Aharon Robbins, 2013/08/29
- Re: feature request: file_not_found_handle(), Chet Ramey, 2013/08/19
Re: feature request: file_not_found_handle(),
Andreas Gregor Frank <=
- Re: feature request: file_not_found_handle(), Chet Ramey, 2013/08/19
- Re: feature request: file_not_found_handle(), Andreas Gregor Frank, 2013/08/19
- Re: feature request: file_not_found_handle(), Roman Rakus, 2013/08/20
- Re: feature request: file_not_found_handle(), Linda Walsh, 2013/08/20
- Re: feature request: file_not_found_handle(), Chris Down, 2013/08/21
- Re: feature request: file_not_found_handle(), Linda Walsh, 2013/08/21
Re: feature request: file_not_found_handle(), Ken Irving, 2013/08/21
Re: feature request: file_not_found_handle(), Greg Wooledge, 2013/08/21
Re: feature request: file_not_found_handle(), Andreas Gregor Frank, 2013/08/21
Re: feature request: file_not_found_handle(), Eduardo A . Bustamante López, 2013/08/21