From 8e8a60a4325e355f15f74979773eed7652321426 Mon Sep 17 00:00:00 2001 From: Piepmatz Date: Sat, 11 Jan 2025 00:55:41 +0100 Subject: [PATCH] Add `"whereis"` and `"get-command"` to `which` search terms (#14797) # Description Today i saw in the general discord channel someone ask what is the nushell equivalent of `whereis` or `get-command`. I wanted to tell the user to use our great search via F1 but then I realized that typing in `whereis` or `get-command` wouldn't really find you something. So I added these two search terms. # User-Facing Changes None. # Tests + Formatting I don't think that really needs testing here :D # After Submitting --- crates/nu-command/src/system/which_.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/crates/nu-command/src/system/which_.rs b/crates/nu-command/src/system/which_.rs index a386590605..f5123dd3b6 100644 --- a/crates/nu-command/src/system/which_.rs +++ b/crates/nu-command/src/system/which_.rs @@ -25,7 +25,14 @@ impl Command for Which { } fn search_terms(&self) -> Vec<&str> { - vec!["find", "path", "location", "command"] + vec![ + "find", + "path", + "location", + "command", + "whereis", // linux binary to find binary locations in path + "get-command", // powershell command to find commands and binaries in path + ] } fn run(