nushell/crates/nu-command/src
baehyunsol 227d1d9508
make the behaviours of last and first more consistent (#9582)
<!--
if this PR closes one or more issues, you can automatically link the PR
with
them by using one of the [*linking
keywords*](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword),
e.g.
- this PR should close #xxxx
- fixes #xxxx

you can also mention related issues, PRs or discussions!
-->

# Description

- fixes #9567 

I have fixed everything mentioned in the issue, and made their help
messages more similar.

<!--
Thank you for improving Nushell. Please, check our [contributing
guide](../CONTRIBUTING.md) and talk to the core team before making major
changes.

Description of your pull request goes here. **Provide examples and/or
screenshots** if your changes affect the user experience.
-->

# User-Facing Changes
<!-- List of all changes that impact the user experience here. This
helps us keep track of breaking changes. -->

- Previously, `last` on binary data returned an integer. Now it returns
a binary
- Now, `[] | last` and `[] | first` are both errors.
- Now, `ls | table | first` and `ls | table | last` are both errors.
2023-07-03 10:19:50 -05:00
..
charting revert: move to ahash (#9464) 2023-06-18 15:27:57 +12:00
conversions convert a string to a raw binary string of 0s and 1s (#9534) 2023-06-28 13:04:07 -05:00
database Improve type hovers (#9515) 2023-06-29 05:19:48 +12:00
date Update some help examples (#8759) 2023-04-05 18:36:00 -05:00
debug remove let-env, focus on mutating $env (#9574) 2023-07-01 07:57:51 +12:00
deprecated fix typo in deprecated message: $nu should be $env (#9579) 2023-07-01 17:55:25 +02:00
env remove let-env, focus on mutating $env (#9574) 2023-07-01 07:57:51 +12:00
experimental fix is-admin example (#9350) 2023-06-03 15:11:14 -05:00
filesystem fix cd permissions when user belongs to folder group (#9531) 2023-06-30 11:03:26 +02:00
filters make the behaviours of last and first more consistent (#9582) 2023-07-03 10:19:50 -05:00
formats Apply nightly clippy fixes (#9482) 2023-06-20 10:17:33 +02:00
generators Document and critically review ShellError variants - Ep. 2 (#8326) 2023-03-06 11:31:07 +01:00
hash move common tools from nu-command to nu-cmd-base (#9455) 2023-06-22 14:45:54 -07:00
help Break up interdependencies of command crates (#9429) 2023-06-14 23:12:55 +02:00
math revert: move to ahash (#9464) 2023-06-18 15:27:57 +12:00
misc REFACTOR: move source out of deprecated commands (#9060) 2023-05-04 00:02:03 +02:00
network Add useful example to http options documentation (#9576) 2023-07-01 10:04:30 +02:00
path revert: move to ahash (#9464) 2023-06-18 15:27:57 +12:00
platform add input_output type to input list to return string (#9557) 2023-06-29 08:27:25 -05:00
random Document and critically review ShellError variants - Ep. 3 (#8340) 2023-03-06 18:33:09 +01:00
shells Fix usage for the exit command. (#9450) 2023-06-16 10:09:02 +02:00
strings A new subcommand to str, str-expand. (#9290) 2023-06-28 12:57:44 -05:00
system revert: move to ahash (#9464) 2023-06-18 15:27:57 +12:00
viewers nu-table/ Fix indexing issue for table --expand (#9484) 2023-06-20 20:27:00 +12:00
default_context.rs remove let-env, focus on mutating $env (#9574) 2023-07-01 07:57:51 +12:00
example_test.rs remove let-env, focus on mutating $env (#9574) 2023-07-01 07:57:51 +12:00
hook.rs cratification: move the bytes command to nu-cmd-extra (#9509) 2023-06-23 12:23:08 -07:00
lib.rs cratification: move the bytes command to nu-cmd-extra (#9509) 2023-06-23 12:23:08 -07:00
progress_bar.rs cp progress bar implementation (#8012) 2023-02-22 11:57:38 -08:00
sort_utils.rs Support passing an empty list to sort, uniq, sort-by, and uniq-by (issue #5957) (#8669) 2023-03-29 19:55:38 -07:00