-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Labels
bugSomething that's not working as intendedSomething that's not working as intended
Milestone
Description
Fish version 3.0.2
OS: Debian Linux
"string split" has explicit option (-n or --empty) to whether return empty elements or not. This works as intended, usually.
~> count (string split / a/)
2
~> count (string split / /a)
2
~> count (string split -n / a/)
1
~> count (string split -n / /a)
1
However, there is an edge case
~> count (string split / /)
0
~> count (string split -n / /)
0
And the returns non-zero status. This feels somewhat inconsistent with the other cases.
- With -n or not, the returned status should be zero, because there was a split.
- The invocation without -n (string split / /) should return array of two empty strings.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething that's not working as intendedSomething that's not working as intended