forked from extern/nushell
feat: add search terms to date (#5306)
* add search terms * add search terms * add search terms * add search terms * add search terms * add search terms * add search terms * add search terms * add search patterns * run cargo fmt --all
This commit is contained in:
committed by
GitHub
parent
b9eb213f36
commit
667eb27d1b
@ -17,6 +17,10 @@ impl Command for Cd {
|
||||
"Change directory."
|
||||
}
|
||||
|
||||
fn search_terms(&self) -> Vec<&str> {
|
||||
vec!["cd", "change", "directory", "dir", "folder", "switch"]
|
||||
}
|
||||
|
||||
fn signature(&self) -> nu_protocol::Signature {
|
||||
Signature::build("cd")
|
||||
.optional("path", SyntaxShape::Directory, "the path to change to")
|
||||
|
@ -28,6 +28,10 @@ impl Command for Cp {
|
||||
"Copy files."
|
||||
}
|
||||
|
||||
fn search_terms(&self) -> Vec<&str> {
|
||||
vec!["cp", "copy", "file", "files"]
|
||||
}
|
||||
|
||||
fn signature(&self) -> Signature {
|
||||
Signature::build("cp")
|
||||
.required("source", SyntaxShape::GlobPattern, "the place to copy from")
|
||||
|
@ -32,6 +32,10 @@ impl Command for Glob {
|
||||
"Creates a list of files and/or folders based on the glob pattern provided."
|
||||
}
|
||||
|
||||
fn search_terms(&self) -> Vec<&str> {
|
||||
vec!["glob", "files", "folders", "list", "ls"]
|
||||
}
|
||||
|
||||
fn examples(&self) -> Vec<Example> {
|
||||
vec![
|
||||
Example {
|
||||
|
@ -32,6 +32,18 @@ impl Command for Mkdir {
|
||||
"Make directories, creates intermediary directories as required."
|
||||
}
|
||||
|
||||
fn search_terms(&self) -> Vec<&str> {
|
||||
vec![
|
||||
"mkdir",
|
||||
"make",
|
||||
"directory",
|
||||
"dir",
|
||||
"folder",
|
||||
"make_dir",
|
||||
"make_dirs",
|
||||
]
|
||||
}
|
||||
|
||||
fn run(
|
||||
&self,
|
||||
engine_state: &EngineState,
|
||||
|
@ -29,6 +29,10 @@ impl Command for Mv {
|
||||
"Move files or directories."
|
||||
}
|
||||
|
||||
fn search_terms(&self) -> Vec<&str> {
|
||||
vec!["mv", "move"]
|
||||
}
|
||||
|
||||
fn signature(&self) -> nu_protocol::Signature {
|
||||
Signature::build("mv")
|
||||
.required(
|
||||
|
@ -25,6 +25,10 @@ impl Command for Open {
|
||||
"Load a file into a cell, converting to table if possible (avoid by appending '--raw')."
|
||||
}
|
||||
|
||||
fn search_terms(&self) -> Vec<&str> {
|
||||
vec!["open", "load", "read", "load_file", "read_file"]
|
||||
}
|
||||
|
||||
fn signature(&self) -> nu_protocol::Signature {
|
||||
Signature::build("open")
|
||||
.optional("filename", SyntaxShape::Filepath, "the filename to use")
|
||||
|
@ -38,6 +38,10 @@ impl Command for Rm {
|
||||
"Remove file(s)."
|
||||
}
|
||||
|
||||
fn search_terms(&self) -> Vec<&str> {
|
||||
vec!["rm", "remove"]
|
||||
}
|
||||
|
||||
fn signature(&self) -> Signature {
|
||||
let sig = Signature::build("rm");
|
||||
#[cfg(all(
|
||||
|
@ -20,6 +20,10 @@ impl Command for Save {
|
||||
"Save a file."
|
||||
}
|
||||
|
||||
fn search_terms(&self) -> Vec<&str> {
|
||||
vec!["save", "write", "write_file"]
|
||||
}
|
||||
|
||||
fn signature(&self) -> nu_protocol::Signature {
|
||||
Signature::build("save")
|
||||
.required("filename", SyntaxShape::Filepath, "the filename to use")
|
||||
|
@ -24,6 +24,10 @@ impl Command for Touch {
|
||||
"touch"
|
||||
}
|
||||
|
||||
fn search_terms(&self) -> Vec<&str> {
|
||||
vec!["touch"]
|
||||
}
|
||||
|
||||
fn signature(&self) -> Signature {
|
||||
Signature::build("touch")
|
||||
.required(
|
||||
|
Reference in New Issue
Block a user