mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 01:24:58 +02:00
make first
behave same way as last
: always return list when with number argument (#6616)
* make `first` behave same way as `last` * better behaviour * fix tests * add tests
This commit is contained in:
@ -12,7 +12,7 @@ fn by_column() {
|
||||
| split column "="
|
||||
| sort-by column1
|
||||
| skip 1
|
||||
| first 1
|
||||
| first
|
||||
| get column1
|
||||
| str trim
|
||||
"#
|
||||
@ -33,7 +33,7 @@ fn by_invalid_column() {
|
||||
| split column "="
|
||||
| sort-by ColumnThatDoesNotExist
|
||||
| skip 1
|
||||
| first 1
|
||||
| first
|
||||
| get column1
|
||||
| str trim
|
||||
"#
|
||||
@ -69,7 +69,7 @@ fn sort_primitive_values() {
|
||||
| skip 1
|
||||
| first 6
|
||||
| sort-by
|
||||
| first 1
|
||||
| first
|
||||
"#
|
||||
));
|
||||
|
||||
|
Reference in New Issue
Block a user