mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-23 21:53:09 +08:00
81a987c39c
If just one of the range ends is negative, this now forces direction away from it. I.e. if the beginning is negative, we go in reverse. If the end is negative, we go forwards. This fixes cases like $var[2..-1] if $var only has one element.
66 lines
543 B
Plaintext
66 lines
543 B
Plaintext
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
|
|
1 baz quux fooest
|
|
2 baz quux
|
|
1 prefixbaz quux fooest
|
|
2 prefixbaz prefixquux
|
|
0
|
|
2 fooest
|
|
0
|
|
0
|
|
2 fooest
|
|
0
|
|
1
|
|
0
|
|
1
|
|
0
|
|
1
|
|
0
|
|
1
|
|
0
|
|
1
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
|
|
|
|
####################
|
|
# Catch your breath
|
|
|
|
####################
|
|
# Test tilde expansion
|