Closed
Description
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.