From 868d94f5732212eacf1f1a0865dbfe3373431399 Mon Sep 17 00:00:00 2001 From: Dylan Snelgrove <45444843+Dylan987@users.noreply.github.com> Date: Fri, 14 Oct 2022 13:02:22 -0400 Subject: [PATCH] Add search terms for export commands (#6722) Contributes to https://github.com/nushell/nushell/issues/5093 --- crates/nu-command/src/core_commands/export.rs | 4 ++++ crates/nu-command/src/core_commands/export_alias.rs | 4 ++++ crates/nu-command/src/core_commands/export_def.rs | 4 ++++ crates/nu-command/src/core_commands/export_def_env.rs | 4 ++++ crates/nu-command/src/core_commands/export_extern.rs | 4 ++++ crates/nu-command/src/core_commands/export_use.rs | 4 ++++ 6 files changed, 24 insertions(+) diff --git a/crates/nu-command/src/core_commands/export.rs b/crates/nu-command/src/core_commands/export.rs index 0f0f8687bf..6dc7c5f741 100644 --- a/crates/nu-command/src/core_commands/export.rs +++ b/crates/nu-command/src/core_commands/export.rs @@ -59,4 +59,8 @@ impl Command for ExportCommand { }), }] } + + fn search_terms(&self) -> Vec<&str> { + vec!["module"] + } } diff --git a/crates/nu-command/src/core_commands/export_alias.rs b/crates/nu-command/src/core_commands/export_alias.rs index 51ebd27116..9f31064936 100644 --- a/crates/nu-command/src/core_commands/export_alias.rs +++ b/crates/nu-command/src/core_commands/export_alias.rs @@ -51,4 +51,8 @@ impl Command for ExportAlias { result: None, }] } + + fn search_terms(&self) -> Vec<&str> { + vec!["aka", "abbr", "module"] + } } diff --git a/crates/nu-command/src/core_commands/export_def.rs b/crates/nu-command/src/core_commands/export_def.rs index 6b06e677fe..1ab327100c 100644 --- a/crates/nu-command/src/core_commands/export_def.rs +++ b/crates/nu-command/src/core_commands/export_def.rs @@ -55,4 +55,8 @@ impl Command for ExportDef { }), }] } + + fn search_terms(&self) -> Vec<&str> { + vec!["module"] + } } diff --git a/crates/nu-command/src/core_commands/export_def_env.rs b/crates/nu-command/src/core_commands/export_def_env.rs index c84dca2805..4ea55cd1e2 100644 --- a/crates/nu-command/src/core_commands/export_def_env.rs +++ b/crates/nu-command/src/core_commands/export_def_env.rs @@ -81,4 +81,8 @@ export def-env cd_with_fallback [arg = ""] { }), }] } + + fn search_terms(&self) -> Vec<&str> { + vec!["module"] + } } diff --git a/crates/nu-command/src/core_commands/export_extern.rs b/crates/nu-command/src/core_commands/export_extern.rs index fd7295f974..b718a80af8 100644 --- a/crates/nu-command/src/core_commands/export_extern.rs +++ b/crates/nu-command/src/core_commands/export_extern.rs @@ -47,4 +47,8 @@ impl Command for ExportExtern { result: None, }] } + + fn search_terms(&self) -> Vec<&str> { + vec!["signature", "module", "declare"] + } } diff --git a/crates/nu-command/src/core_commands/export_use.rs b/crates/nu-command/src/core_commands/export_use.rs index 933342611d..48676a647d 100644 --- a/crates/nu-command/src/core_commands/export_use.rs +++ b/crates/nu-command/src/core_commands/export_use.rs @@ -53,4 +53,8 @@ impl Command for ExportUse { }), }] } + + fn search_terms(&self) -> Vec<&str> { + vec!["reexport", "import", "module"] + } }