mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-06 00:41:15 -03:00
Don't count successive "," as literal in brace expansion
This was highly surprising. Fixes #3002.
This commit is contained in:
@@ -15,11 +15,15 @@ logmsg Bracket expansion
|
||||
echo x-{1}
|
||||
echo x-{1,2}
|
||||
echo foo-{1,2{3,4}}
|
||||
|
||||
echo foo-{} # literal "{}" expands to itself
|
||||
echo foo-{{},{}} # the inner "{}" expand to themselves, the outer pair expands normally.
|
||||
echo foo-{""} # still expands to foo-
|
||||
echo foo-{$undefinedvar} # still expands to nothing
|
||||
|
||||
echo foo-{,,,} # four empty items in the braces.
|
||||
echo foo-{,\,,} # an empty item, a "," and an empty item.
|
||||
|
||||
logmsg Escaped newlines
|
||||
echo foo\ bar
|
||||
echo foo\
|
||||
|
||||
Reference in New Issue
Block a user