Skip to content

Dereferencing array[0] should be a tokenizer or parser error #4862

@mqudsi

Description

@mqudsi

I've asked about this in the chat but haven't heard anything regarding if it's ever valid to access array[0]. Presuming the answer is no:

Since fish array indices start at 1 (unlike many other programming/scripting languages), I'm probably not the only one that forgets and starts at 0 from time to time. If [0] has no special meaning, it should be a hard error (instead of returning an empty result) so that it is clear there is something wrong with the script.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions