From 1bdcdcca701eef81b7ddc153f72644bf96862313 Mon Sep 17 00:00:00 2001 From: Justin Date: Wed, 8 Dec 2021 17:04:55 +0800 Subject: [PATCH] fix: change `into column_path` to `into column-path` (breaking change) (#4185) (#4189) --- .../commands/conversions/into/column_path.rs | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/crates/nu-command/src/commands/conversions/into/column_path.rs b/crates/nu-command/src/commands/conversions/into/column_path.rs index 2407605c5..141bb68c4 100644 --- a/crates/nu-command/src/commands/conversions/into/column_path.rs +++ b/crates/nu-command/src/commands/conversions/into/column_path.rs @@ -7,14 +7,14 @@ pub struct SubCommand; impl WholeStreamCommand for SubCommand { fn name(&self) -> &str { - "into column_path" + "into column-path" } fn signature(&self) -> Signature { - Signature::build("into column_path").rest( + Signature::build("into column-path").rest( "rest", SyntaxShape::ColumnPath, - "values to convert to column_path", + "values to convert to column path", ) } @@ -29,8 +29,8 @@ impl WholeStreamCommand for SubCommand { fn examples(&self) -> Vec { vec![ Example { - description: "Convert string to column_path in table", - example: "echo [[name]; ['/dev/null'] ['C:\\Program Files'] ['../../Cargo.toml']] | into column_path name", + description: "Convert string to column path in table", + example: "echo [[name]; ['/dev/null'] ['C:\\Program Files'] ['../../Cargo.toml']] | into column-path name", result: Some(vec![ UntaggedValue::row(indexmap! { "name".to_string() => UntaggedValue::column_path("/dev/null", Span::unknown()).into(), @@ -47,8 +47,8 @@ impl WholeStreamCommand for SubCommand { ]), }, Example { - description: "Convert string to column_path", - example: "echo 'Cargo.toml' | into column_path", + description: "Convert string to column path", + example: "echo 'Cargo.toml' | into column-path", result: Some(vec![UntaggedValue::column_path("Cargo.toml", Span::unknown()).into()]), }, ] @@ -86,7 +86,7 @@ pub fn action(input: &Value, tag: impl Into) -> Result { Primitive::String(a_string) => a_string, _ => { return Err(ShellError::unimplemented( - "'into column_path' for non-string primitives", + "'into column-path' for non-string primitives", )) } }, @@ -94,12 +94,12 @@ pub fn action(input: &Value, tag: impl Into) -> Result { ) .into_value(&tag)), UntaggedValue::Row(_) => Err(ShellError::labeled_error( - "specify column name to use, with 'into column_path COLUMN'", + "specify column name to use, with 'into column-path COLUMN'", "found table", tag, )), _ => Err(ShellError::unimplemented( - "'into column_path' for unsupported type", + "'into column-path' for unsupported type", )), } }