Commit Graph

4 Commits

Author SHA1 Message Date
Johannes Altmanninger
062f24d91b builtin set: make slice index range optional, like in slice expansion
Expansion parses slices like "$PATH[1..2]", but so does "set" when assigning
"set PATH[1..2] . .".  Commit be06f842a ("Allow to omit indices in index
range expansions") forgot the latter.
2021-01-28 07:19:38 +01:00
Fabian Homborg
9367d4ff71 Reindent functions to remove useless quotes
This does not include checks/function.fish because that currently
includes a "; end" in a message that indent would remove, breaking the test.
2020-03-09 19:46:43 +01:00
Johannes Altmanninger
be06f842a2 Allow to omit indices in index range expansions
Missing range limits in, say $PATH[..] default to the first/last
element, just like Python/Go/Rust slices.
2020-02-10 18:38:01 +01:00
Fabian Homborg
ee8ca246f8 Port test8 to littlecheck
This one tests a bunch of separate stuff, so we put it into a few
different files.

The main, new one is "slices.fish", which tests various index expressions.
2020-02-08 15:55:10 +01:00