bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bash 4.4-rc1 EXECIGNORE not fully working?


From: Chet Ramey
Subject: Re: bash 4.4-rc1 EXECIGNORE not fully working?
Date: Sat, 19 Mar 2016 13:19:50 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.6.0

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    address@hidden    http://cnswww.cns.cwru.edu/~chet/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]