bug-bash
[Top][All Lists]
Advanced

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

Re: Tilde expandion for values of long options


From: Eric Blake
Subject: Re: Tilde expandion for values of long options
Date: Sat, 08 Dec 2007 21:39:06 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Chet Ramey on 12/8/2007 9:18 PM:
> You're correct that Posix doesn't say either form should be expanded.
> The first is a bash extension (and only bash -- it isn't done when bash
> is running in posix mode).

Speaking of tilde expansion and bash, are you aware that a POSIX
interpretation was just issued for review that states that the result of
tilde expansion should behave as though it were quoted, and not undergo
further pathname expansion or field splitting?  The interpretation
(Austin-202) is still undergoing review, so it requires a login to read:
https://www.opengroup.org/austin/interps/protected/uploads/20/15352/AI-202.txt

But anyone can read the original report that spawned the interpretation
http://www.opengroup.org/austin/aardvark/latest/xcubug2.txt (search for
number 169)

The reasoning behind this is that ~ already represents a single path name,
so it should not be further expanded.  However, bash 3.2 does not obey
this rule (it avoids field splitting, but mistakenly performs pathname
expansion if $HOME contains glob characters).

- --
Don't work too hard, make some time for fun as well!

Eric Blake             ebb9@byu.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHW3Fq84KuGfSFAYARAidCAJ4jxsm6ny2/7etKuvGW30DULfTD2wCfZM6A
SPHJtxUrt7wqjkfLYq9iVdc=
=DtLM
-----END PGP SIGNATURE-----




reply via email to

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