mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 12:53:13 +00:00
d6a5792ce2
Code like echo $list[$var[1]] was producing an error because of nested square brackets. Allow these brackets again. Fixes #5362
89 lines
987 B
Text
89 lines
987 B
Text
1
|
|
0
|
|
1 prefix
|
|
0
|
|
1
|
|
0
|
|
1 prefix
|
|
0
|
|
1
|
|
1
|
|
1 prefix
|
|
1 prefix
|
|
1
|
|
0
|
|
1 prefix
|
|
0
|
|
1
|
|
0
|
|
1 prefix
|
|
0
|
|
1 baz
|
|
1 baz
|
|
1 prefixbaz
|
|
1 prefixbaz
|
|
1 baz quux
|
|
2 baz quux
|
|
1 prefixbaz quux
|
|
2 prefixbaz prefixquux
|
|
1 baz quux fooer fooest
|
|
2 baz quux
|
|
1 prefixbaz quux fooer fooest
|
|
2 prefixbaz prefixquux
|
|
3 baz quux
|
|
3 prefixbaz prefixquux prefix
|
|
|
|
####################
|
|
# Slices
|
|
1 baz quux fooest
|
|
2 baz quux
|
|
1 prefixbaz quux fooest
|
|
2 prefixbaz prefixquux
|
|
0
|
|
2 fooest
|
|
0
|
|
0
|
|
2 fooest
|
|
0
|
|
0
|
|
# foo =
|
|
1
|
|
0
|
|
1
|
|
0
|
|
1
|
|
0
|
|
1
|
|
0
|
|
1
|
|
0
|
|
# foo = a b c
|
|
0
|
|
0
|
|
0
|
|
0
|
|
# foo = a
|
|
0
|
|
|
|
out2
|
|
out2 out1
|
|
|
|
####################
|
|
# Percent self
|
|
%selfNOT NOT%self %self %self %self
|
|
All digits: 0
|
|
|
|
####################
|
|
# Catch your breath
|
|
|
|
####################
|
|
# Test tilde expansion
|
|
|
|
####################
|
|
# Test path variables
|
|
TEST_DELIMITER: one two three one two three
|
|
TEST_DELIMITER_PATH: one two three one:two:three
|
|
Not a path: ONE:TWO:THREE 1
|
|
As a path: ONE:TWO:THREE 3
|
|
Appended path: ONE:TWO:THREE:FOUR 4
|
|
Back to normal variable: ONE TWO THREE FOUR 4
|