mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 12:53:13 +00: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.
12 lines
215 B
Text
12 lines
215 B
Text
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
|
|
^
|