mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-06 14:21:14 -03:00
Double expansions of variables had the following issues:
* `"$$foo"` threw an error no matter what the value of `$foo` was.
* `set -l foo ''; echo $$foo` threw an error because of the expansion of
`$foo` to `''`.
With this change, double expansion always works properly. When
double-expanding a multi-valued variable, in a double-quoted string the
first word of the inner expansion is used for the outer expansion, and
outside of a quoted string every word is used for the double-expansion
in each of the arguments.
> set -l foo bar baz
> set -l bar one two
> set -l baz three four
> echo "$$foo"
one two baz
> echo $$foo
one two three four
13 lines
309 B
Plaintext
13 lines
309 B
Plaintext
Testing high level script functionality
|
|
File expansion.in tested ok
|
|
File printf.in tested ok
|
|
File test1.in tested ok
|
|
File test2.in tested ok
|
|
File test3.in tested ok
|
|
File test4.in tested ok
|
|
File test5.in tested ok
|
|
File test6.in tested ok
|
|
File test7.in tested ok
|
|
File test8.in tested ok
|
|
File test9.in tested ok
|