From 67c8b0db693a5428042ddb3110d50e82f17470bf Mon Sep 17 00:00:00 2001 From: Ian Manske Date: Sun, 7 Apr 2024 01:24:00 +0000 Subject: [PATCH] Mention `print` in the `echo` help text (#12436) # Description Edits the `echo` help text to mention the `print` command. --------- Co-authored-by: Darren Schroeder <343840+fdncred@users.noreply.github.com> --- crates/nu-cmd-lang/src/core_commands/echo.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/nu-cmd-lang/src/core_commands/echo.rs b/crates/nu-cmd-lang/src/core_commands/echo.rs index f28702ebc8..00c8b1329c 100644 --- a/crates/nu-cmd-lang/src/core_commands/echo.rs +++ b/crates/nu-cmd-lang/src/core_commands/echo.rs @@ -20,8 +20,10 @@ impl Command for Echo { } fn extra_usage(&self) -> &str { - r#"When given no arguments, it returns an empty string. When given one argument, -it returns it. Otherwise, it returns a list of the arguments. There is usually + r#"Unlike `print`, which prints unstructured text to stdout, `echo` is like an +identity function and simply returns its arguments. When given no arguments, +it returns an empty string. When given one argument, it returns it as a +nushell value. Otherwise, it returns a list of the arguments. There is usually little reason to use this over just writing the values as-is."# }