You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Brace expansion seems a bit inconsistent in its behaviour, see below. The documentation is also not so clear about this case.
Reproduction Steps:
Run: begin; set -l arr a b; echo x{$arr,c}y; end
Run: begin; set -l arr a b; echo x{{a,b},c}y; end
Expected behavior:
I expect 1. to give the same output as 2, ie: xay xby xcy.
That's the same output as echo x{a,b,c}y (ie things (arrays or other brace expressions) inside a brace expression should be unioned togheter when expanding).
This for consistency and simplicity reasons. I expect $arr and {a,b} to work in the same way in cases when they are both expanded.
Observed behavior:
Outputs: xay xcy xby xcy
Outputs: xay xby xcy
Additional information:
Fish version: fish, version 2.2.0-876-g1c6f6df
Operating system: ubuntu 64-bit, compiled fish from github source
Terminal or terminal emulator: The builtin terminal emulator of neovim.
The text was updated successfully, but these errors were encountered:
Here we have only one , in the outermost brace expression, but the problem in #3002 needs two , in order to reproduce.
jakwings added other examples in #3002, but I think those examples are more related to this issue (#3004).
Because of this I think this issue should be reopened. However it doesn't matter so much, I can check if this issue #3004 is solved when #3002 is solved, but I'm not sure that may be the case.
Brace expansion seems a bit inconsistent in its behaviour, see below. The documentation is also not so clear about this case.
Reproduction Steps:
begin; set -l arr a b; echo x{$arr,c}y; end
begin; set -l arr a b; echo x{{a,b},c}y; end
Expected behavior:
I expect 1. to give the same output as 2, ie:
xay xby xcy
.That's the same output as
echo x{a,b,c}y
(ie things (arrays or other brace expressions) inside a brace expression should be unioned togheter when expanding).This for consistency and simplicity reasons. I expect
$arr
and{a,b}
to work in the same way in cases when they are both expanded.Observed behavior:
xay xcy xby xcy
xay xby xcy
Additional information:
Fish version: fish, version 2.2.0-876-g1c6f6df
Operating system: ubuntu 64-bit, compiled fish from github source
Terminal or terminal emulator: The builtin terminal emulator of neovim.
The text was updated successfully, but these errors were encountered: