mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 14:06:40 +02:00
Merge skip command varieties into one command with sub commands. (#2179)
This commit is contained in:
committed by
GitHub
parent
5f1075544c
commit
71e55541d7
@ -37,7 +37,7 @@ fn condition_is_met() {
|
||||
| skip 2
|
||||
| split column ','
|
||||
| headers
|
||||
| skip-while "Chicken Collection" != "Blue Chickens"
|
||||
| skip while "Chicken Collection" != "Blue Chickens"
|
||||
| keep-until "Chicken Collection" == "Red Chickens"
|
||||
| skip 1
|
||||
| str to-int "31/04/2020"
|
||||
|
@ -7,7 +7,7 @@ fn lines() {
|
||||
r#"
|
||||
open cargo_sample.toml -r
|
||||
| lines
|
||||
| skip-while $it != "[dependencies]"
|
||||
| skip while $it != "[dependencies]"
|
||||
| skip 1
|
||||
| first 1
|
||||
| split column "="
|
||||
|
@ -43,8 +43,7 @@ mod rm;
|
||||
mod save;
|
||||
mod select;
|
||||
mod semicolon;
|
||||
mod skip_until;
|
||||
mod skip_while;
|
||||
mod skip;
|
||||
mod sort_by;
|
||||
mod split_by;
|
||||
mod split_column;
|
||||
|
2
crates/nu-cli/tests/commands/skip/mod.rs
Normal file
2
crates/nu-cli/tests/commands/skip/mod.rs
Normal file
@ -0,0 +1,2 @@
|
||||
mod until;
|
||||
mod while_;
|
@ -4,7 +4,7 @@ use nu_test_support::{nu, pipeline};
|
||||
|
||||
#[test]
|
||||
fn condition_is_met() {
|
||||
Playground::setup("skip-until_test_1", |dirs, sandbox| {
|
||||
Playground::setup("skip_until_test_1", |dirs, sandbox| {
|
||||
sandbox.with_files(vec![FileWithContentToBeTrimmed(
|
||||
"caballeros.txt",
|
||||
r#"
|
||||
@ -37,7 +37,7 @@ fn condition_is_met() {
|
||||
| skip 2
|
||||
| split column ','
|
||||
| headers
|
||||
| skip-until "Chicken Collection" == "Red Chickens"
|
||||
| skip until "Chicken Collection" == "Red Chickens"
|
||||
| skip 1
|
||||
| str to-int "31/04/2020"
|
||||
| get "31/04/2020"
|
@ -4,7 +4,7 @@ use nu_test_support::{nu, pipeline};
|
||||
|
||||
#[test]
|
||||
fn condition_is_met() {
|
||||
Playground::setup("skip-while_test_1", |dirs, sandbox| {
|
||||
Playground::setup("skip_while_test_1", |dirs, sandbox| {
|
||||
sandbox.with_files(vec![FileWithContentToBeTrimmed(
|
||||
"caballeros.txt",
|
||||
r#"
|
||||
@ -37,7 +37,7 @@ fn condition_is_met() {
|
||||
| skip 2
|
||||
| split column ','
|
||||
| headers
|
||||
| skip-while "Chicken Collection" != "Red Chickens"
|
||||
| skip while "Chicken Collection" != "Red Chickens"
|
||||
| skip 1
|
||||
| str to-int "31/04/2020"
|
||||
| get "31/04/2020"
|
Reference in New Issue
Block a user