[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bug? "type -P xxx" returns "xxx" that isn't executable...(or readabl
From: |
Chet Ramey |
Subject: |
Re: bug? "type -P xxx" returns "xxx" that isn't executable...(or readable) |
Date: |
Mon, 04 Aug 2014 11:53:10 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 |
On 8/1/14, 5:44 PM, Linda Walsh wrote:
> Greg Wooledge wrote:
>> On Thu, Jul 31, 2014 at 11:40:18PM -0700, Linda Walsh wrote:
>>
>>> Ishtar:/> ll {,/usr}/bin/echo
>>> -rw-r--r-- 2 136753 Nov 19 2013 /bin/echo
>>> --w------- 2 136753 Nov 19 2013 /usr/bin/echo
>>>
>>>> sudo chmod +x /bin/echo
>>> Ishtar:/> type -P echo
>>> /bin/echo #correct
>>>
>>
>> How is that correct? Neither of them is executable.
> ---
> Did you miss the "chmod" right below the "ll"?
>
>> Bash behaves as expected in POSIX compatibility mode:
>>
>> golem:~$ bash --posix -c 'command -v kumquat'
>> golem:~$ bash -c 'command -v kumquat'
>> /home/greg/bin/kumquat
>>
>> In non-POSIX-compatibility mode, I guess you just have to iterate
>> through PATH yourself, or iterate through the results of "type -a".
>> (Or toggle POSIX compatibility on just for this check.)
>>
> ---
> There are bugs in toggling on POSIX compatibility in that toggling
> it on, then off, doesn't get you back to your starting state.
>
> Example is remapping of the completion key. Go into posix, it remaps
> it to some value (I assume you cannot remap completion keys in posix, else
> there is no reason to reset the completion key at this point).
>
> Then go back -- the TAB key is unmapped as a completion char,
> but your old completion key is not remapped. So you end up with
> no completion keys. There are probably lots of other "one-way-adjustments",
> but I haven't hit them all.
I'm going to guess that this is the same problem I discussed in
http://lists.gnu.org/archive/html/bug-bash/2014-06/msg00049.html
but the description above pretty much makes a hash of it.
--
``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/