From 0ca5c2f1356b2f2ad57060ec39ec8cb0b6b4f789 Mon Sep 17 00:00:00 2001 From: Piepmatz Date: Fri, 25 Apr 2025 13:56:30 +0200 Subject: [PATCH] Add `cat` and `get-content` to `open`'s search terms (#15643) # Description A friend of mine started using nushell on Windows and wondered why the `cat` command wasn't available. I answered to him, that he can use `help -f` or F1 to find the command but then we both realized that neither `cat` nor `Get-Command` were part of `open`'s search terms. So I added them. # User-Facing Changes None. # Tests + Formatting - :green_circle: `toolkit fmt` - :green_circle: `toolkit clippy` - :green_circle: `toolkit test` - :green_circle: `toolkit test stdlib` # After Submitting --- crates/nu-command/src/filesystem/open.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/crates/nu-command/src/filesystem/open.rs b/crates/nu-command/src/filesystem/open.rs index cd91f43aad..276b0b28c1 100644 --- a/crates/nu-command/src/filesystem/open.rs +++ b/crates/nu-command/src/filesystem/open.rs @@ -34,7 +34,14 @@ impl Command for Open { } fn search_terms(&self) -> Vec<&str> { - vec!["load", "read", "load_file", "read_file"] + vec![ + "load", + "read", + "load_file", + "read_file", + "cat", + "get-content", + ] } fn signature(&self) -> nu_protocol::Signature {