bug-bash
[Top][All Lists]
Advanced

[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: Wed, 23 Jul 2014 08:43:49 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0

On 07/23/2014 08:38 AM, Eric Blake wrote:
> On 07/23/2014 08:08 AM, lolilolicon wrote:

>> >From this page: http://pubs.opengroup.org/onlinepubs/7908799/xcu/chap2.html
>>
>>     Note that the tildes are expanded during the assignment to PATH, not
>>     when PATH is accessed during command search.
> 
> No, it wasn't.  Re-read the original post:
> 
>     PATH=\~/tmpdir

The reference you were quoting used this example:

PATH=~hlj/bin:~dwc/bin:$PATH

where ~ is unquoted in the assignment, and therefore expanded during the
assignment.  But we are talking about the case where ~ IS quoted during
the assignment, and only bash then re-expands it during path lookup.

-- 
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]