Adds drop number of rows command (#1663)

* Fix access to columns with quoted names

* Add a drop number of rows from end of table
This commit is contained in:
Jonathan Turner
2020-04-26 18:34:45 +12:00
committed by GitHub
parent df90d9e4b6
commit 2ac501f88e
5 changed files with 75 additions and 0 deletions

View File

@ -0,0 +1,11 @@
use nu_test_support::nu;
#[test]
fn drop_rows() {
let actual = nu!(
cwd: "tests/fixtures/formats",
r#"echo '[{"foo": 3}, {"foo": 8}, {"foo": 4}]' | from-json | drop 2 | get foo | sum | echo $it"#
);
assert_eq!(actual, "3");
}

View File

@ -5,6 +5,7 @@ mod cd;
mod compact;
mod cp;
mod default;
mod drop;
mod each;
mod edit;
mod enter;