-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Index range expansion treats ending index 0 as 1 #8213
Comments
I am sorry to be that guy, but actually, your example seems to work as specified. To my understanding, Unlike the |
There's also this:
|
Well, there is no such thing as a negative zero, just zero, so this is apparently interpreted as |
Ah, I see I have missed your first example. That is an inconsistency, right enough; fish should either process all ranges still valid after dropping the 0 index, or error out on all ranges including a 0 index. |
fish --version: 3.3.1
Quoting the docs:
However, it seems index range expansion treats ending index 0 as 1:
This behavior is, at least for me, unexpected and seems in contrary to what the docs says (it is
an invalid index but doesn't result in no value).
Or in other words, why can the index end with 0 if it can't start at 0?
The text was updated successfully, but these errors were encountered: