From b15c824932934e2375fbd8882670b80cb130e562 Mon Sep 17 00:00:00 2001 From: Ofek Lev Date: Mon, 4 Sep 2023 13:17:56 -0400 Subject: [PATCH] Fix example history command pipeline (#10220) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit the example for `history` was out of date, this PR updates it. ## the failing command ``` ❯ history | wrap cmd | where cmd =~ cargo Error: nu::shell::type_mismatch × Type mismatch during operation. ╭─[entry #23:1:1] 1 │ history | wrap cmd | where cmd =~ cargo · ───┬─── ─┬ ──┬── · │ │ ╰── string · │ ╰── type mismatch for operator · ╰── record ╰──── ``` --- crates/nu-cli/src/commands/history.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/nu-cli/src/commands/history.rs b/crates/nu-cli/src/commands/history.rs index 3a0de5e8a..0280ccb78 100644 --- a/crates/nu-cli/src/commands/history.rs +++ b/crates/nu-cli/src/commands/history.rs @@ -139,7 +139,7 @@ impl Command for History { result: None, }, Example { - example: "history | wrap cmd | where cmd =~ cargo", + example: "history | where command =~ cargo | get command", description: "Search all the commands from history that contains 'cargo'", result: None, },