[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:38:24 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 |
On 07/23/2014 08:08 AM, lolilolicon wrote:
> On Wed, Jul 23, 2014 at 9:58 PM, Eric Blake <eblake@redhat.com> wrote:
>>
>> Might be worth asking the POSIX folks if it is allowed by POSIX. What
>> do other shells do?
>
>>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
typeset -p PATH
which produced this output:
declare -x PATH="~/tmpdir"
which proves that ~ was not expanded in the assignment to PATH, but only
in the use of PATH.
I'm strongly in favor of keeping bash's behavior when in bash mode, but
for 'set -o posix', I worry that bash differing from other shells may
mean bash is not compliant with POSIX.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- Tilde expansion during command search, Dan Douglas, 2014/07/23
- Re: Tilde expansion during command search, Chet Ramey, 2014/07/23
- Re: Tilde expansion during command search, Dan Douglas, 2014/07/23
- Re: Tilde expansion during command search, Eric Blake, 2014/07/23
- Re: Tilde expansion during command search, Dan Douglas, 2014/07/23
- Re: Tilde expansion during command search, lolilolicon, 2014/07/23
- Re: Tilde expansion during command search,
Eric Blake <=
- Re: Tilde expansion during command search, Eric Blake, 2014/07/23
- Re: Tilde expansion during command search, lolilolicon, 2014/07/23
- Re: Tilde expansion during command search, lolilolicon, 2014/07/24
- Re: Tilde expansion during command search, Dan Douglas, 2014/07/24