mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-03-03 21:26:27 +08:00
parent
321fd74de0
commit
a8fddf3d9b
@ -222,6 +222,19 @@ expansion $foo[4..-2]
|
||||
set -l foo a
|
||||
expansion $foo[2..-1]
|
||||
#CHECK: 0
|
||||
expansion $foo[0]
|
||||
#CHECKERR: {{.*}}expansion.fish (line {{\d+}}): array indices start at 1, not 0.
|
||||
#CHECKERR: expansion $foo[0]
|
||||
#CHECKERR: ^
|
||||
# see https://github.com/fish-shell/fish-shell/issues/8213
|
||||
expansion $foo[1..0]
|
||||
#CHECKERR: {{.*}}expansion.fish (line {{\d+}}): array indices start at 1, not 0.
|
||||
#CHECKERR: expansion $foo[1..0]
|
||||
#CHECKERR: ^
|
||||
expansion $foo[-0]
|
||||
#CHECKERR: {{.*}}expansion.fish (line {{\d+}}): array indices start at 1, not 0.
|
||||
#CHECKERR: expansion $foo[-0]
|
||||
#CHECKERR: ^
|
||||
|
||||
echo "$foo[d]"
|
||||
#CHECKERR: {{.*}}expansion.fish (line {{\d+}}): Invalid index value
|
||||
|
Loading…
x
Reference in New Issue
Block a user