Would be neat if string sub --length accepted negatives indexes, just like string sub --start, e.g.
$ string sub --length -2 -- foobar
foob
AFAIK, the only way to achieve this at the moment is:
$ set s foobar
$ string sub --length (math (string length -- $s) - 2) -- $s
foob
(Also, feel like this option should be (re?)named --end to match --start)
Would be neat if
string sub --lengthaccepted negatives indexes, just likestring sub --start, e.g.AFAIK, the only way to achieve this at the moment is:
(Also, feel like this option should be (re?)named
--endto match--start)