nushell/crates/nu-command
Stefan Holderbach ce03d8eb12
Error on negative argument to last (#7184)
# Description

- Error on negative argument to `last`
- Add test for negative value in last

Follow-up for #7178

# User-Facing Changes

Breaking change:

even before #7178 `last` returned an empty `list<any>` when given
negative indices.
Now this is an
[error](https://docs.rs/nu-protocol/latest/nu_protocol/enum.ShellError.html#variant.NeedsPositiveValue)

Note:
In #7136 we are considering supporting negative indexing

# Tests + Formatting

+ 1 failure test

# After Submitting

If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
2022-11-23 17:04:04 +13:00
..
assets refactor html module (#5246) 2022-04-20 08:50:14 -05:00
proptest-regressions/format_conversions add tests, deal with pipes, newlines, tabs for to nuon (#6391) 2022-09-01 14:08:19 +02:00
src Error on negative argument to last (#7184) 2022-11-23 17:04:04 +13:00
tests Error on negative argument to last (#7184) 2022-11-23 17:04:04 +13:00
build.rs Fix panic when building without git (#6289) 2022-08-10 10:31:12 -05:00
Cargo.toml Feature cleanup (#7182) 2022-11-22 16:58:11 -08:00
LICENSE Include license text in all crates (#5094) 2022-04-08 10:47:13 +02:00