https://bugzilla.novell.com/show_bug.cgi?id=755453
https://bugzilla.novell.com/show_bug.cgi?id=755453#c1
Ned Ulbricht changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |nedu@netscape.net
--- Comment #1 from Ned Ulbricht 2012-04-03 15:06:09 UTC ---
Has this been discussed somewhere else?
I also observe the behaviour which you have documented here. And,
additionally, the same on openSUSE 11.4 bash, version 4.1.10(1)-release
(i586-suse-linux-gnu) bash-4.1-20.25.1.i586.rpm.
But I do not see that the openSUSE bash results differ from the specified
behaviour in the bash(1) man page.
Working backwards:
Quote removal is documented to occur: "After the preceding expansions, all
unquoted occurrences of the characters \, ', and " that did not result from one
of the above expansions are removed." Thus we expect that the outer double
quotes will be removed.
But when single quotes result from a parameter expansion, then I would not
expect quote removal to occur.
Looking at the result of the parameter expansion, at the substituted string:
"Words of the form $'string' are treated specially.... The expanded result is
single-quoted, as if the dollar sign had not been present." So I would expect
single quotes in the substitution.
Compare:
$ unset a; echo "${a:-x$'\t'x}"
The openSUSE 11.4 and 12.1 systems seem to display consistent behaviour, while
another distribution appears to display behaviour which is not consistent with
the parameter expansion in your test case.
As I asked at the beginning, has this been discussed somewhere else?
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.