mirror of
https://github.com/nushell/nushell.git
synced 2025-06-30 14:40:06 +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:
@ -4,7 +4,7 @@ use nu_test_support::nu;
|
||||
fn can_get_reverse_first() {
|
||||
let actual = nu!(
|
||||
cwd: "tests/fixtures/formats",
|
||||
"ls | sort-by name | reverse | first 1 | get name | str trim "
|
||||
"ls | sort-by name | reverse | first | get name | str trim "
|
||||
);
|
||||
|
||||
assert_eq!(actual.out, "utf16.ini");
|
||||
|
Reference in New Issue
Block a user