From 58261262843459da464f15e495e5444ecae6668e Mon Sep 17 00:00:00 2001 From: Fernando Herrera Date: Sat, 31 Jul 2021 15:01:05 +0100 Subject: [PATCH] simple contains arguments (#3874) --- .../nu-command/src/commands/dataframe/series/contains.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/crates/nu-command/src/commands/dataframe/series/contains.rs b/crates/nu-command/src/commands/dataframe/series/contains.rs index 914615a3df..c58e49a0dc 100644 --- a/crates/nu-command/src/commands/dataframe/series/contains.rs +++ b/crates/nu-command/src/commands/dataframe/series/contains.rs @@ -20,11 +20,10 @@ impl WholeStreamCommand for DataFrame { } fn signature(&self) -> Signature { - Signature::build("dataframe contains").required_named( + Signature::build("dataframe contains").required( "pattern", SyntaxShape::String, "Regex pattern to be searched", - Some('p'), ) } @@ -35,7 +34,7 @@ impl WholeStreamCommand for DataFrame { fn examples(&self) -> Vec { vec![Example { description: "Returns boolean indicating if patter was found", - example: "[abc acb acb] | dataframe to-df | dataframe contains -p ab", + example: "[abc acb acb] | dataframe to-df | dataframe contains ab", result: Some(vec![NuDataFrame::try_from_columns( vec![Column::new( "0".to_string(), @@ -55,7 +54,7 @@ impl WholeStreamCommand for DataFrame { fn command(mut args: CommandArgs) -> Result { let tag = args.call_info.name_tag.clone(); - let pattern: Tagged = args.req_named("pattern")?; + let pattern: Tagged = args.req(0)?; let (df, df_tag) = NuDataFrame::try_from_stream(&mut args.input, &tag.span)?;