[Top][All Lists]

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

Re: Tilde expansion during command search

From: Eric Blake
Subject: Re: Tilde expansion during command search
Date: Fri, 01 Aug 2014 09:26:08 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.7.0

On 08/01/2014 07:53 AM, Dan Douglas wrote:

>> how so ?  execvp doesn't do tilde expansion.  only the shell does.
> That's the problem. A program using execvp should be able to expect the same 
> result as that of the shell for a given PATH value. Because of this, it 
> can't, unless exec has the same implementation.
>> and it does it once at assignment.
> The example from my first post demonstrates that Bash substitutes a literal 
> tilde in PATH during the actual path search before executing a command, in 
> addition to during assignments and word expansions.

And that bash is the odd one out in comparison to all other shells.  I
think bash is buggy for performing tilde expansion during PATH lookup
for literal tildes contained in PATH, because no other shell does it,
and POSIX does not specify that it would happen.

Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

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