On 3/18/16 12:09 PM, Dennis Williamson wrote:
> $ type -a ls
> ls is /bin/ls
> $ # ls tab completion includes ls
> $ ls foo
> foo
> $ EXECIGNORE=/bin/ls
> $ type -a ls
> bash: type: ls: not found
> $ # ls tab completion does not include ls
> $ ls foo
> foo
> $ /bin/ls foo
> foo
> 
> So ls is still executed despite the setting. I tried the same with
> /usr/bin/find and got the same result.

Yes, this is my fault.  I did not check the original patch carefully
enough.  It claimed to inhibit executables found via a PATH search, but
did not do a complete job.  (I also managed to drop the last line from the
original patch.)

It's an easy one-line fix to make the behavior match the documentation,
at least with respect to PATH searching, and that will be in the bash-4.4
release.

You should note that it would never have worked given the example above;
the first time you executed ls -- before setting EXECIGNORE -- put the
full pathname into the hash table and inhibited future path lookups.  I
need to modify the documentation to clarify that it only affects PATH
lookups.

Chet
-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    c...@case.edu    http://cnswww.cns.cwru.edu/~chet/

Reply via email to