mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-27 11:43:37 +08:00
44f2f37bd4
This just removes every invalid index. That means with `set foo a b c` and the "show" function from tests/expand.in: - `show $foo[-5..-1]` prints "3 a b c" - `show $foo[-10..1]` prints "1 a" - `show $foo[2..5]` prints "2 b c" - `show $foo[1 3 7 2]` prints "3 a c b" and similar for command substitutions. Fixes #826.
13 lines
215 B
Plaintext
13 lines
215 B
Plaintext
fish: Invalid index value
|
|
echo "$foo[d]"
|
|
^
|
|
fish: Invalid index value
|
|
echo $foo[d]
|
|
^
|
|
fish: Invalid index value
|
|
echo ()[d]
|
|
^
|
|
fish: $) is not a valid variable in fish.
|
|
echo $$paren
|
|
^
|