Skip to content

Commit

Permalink
Add search terms to roll commands
Browse files Browse the repository at this point in the history
  • Loading branch information
rjfc committed Oct 16, 2022
1 parent 0bbb3a2 commit f3957fd
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 0 deletions.
4 changes: 4 additions & 0 deletions crates/nu-command/src/filters/roll/roll_.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ impl Command for Roll {
"roll"
}

fn search_terms(&self) -> Vec<&str> {
vec!["rotate", "shift", "move"]
}

fn signature(&self) -> Signature {
Signature::build(self.name()).category(Category::Filters)
}
Expand Down
4 changes: 4 additions & 0 deletions crates/nu-command/src/filters/roll/roll_down.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ impl Command for RollDown {
"roll down"
}

fn search_terms(&self) -> Vec<&str> {
vec!["rotate", "shift", "move", "row"]
}

fn signature(&self) -> Signature {
Signature::build(self.name())
.named("by", SyntaxShape::Int, "Number of rows to roll", Some('b'))
Expand Down
4 changes: 4 additions & 0 deletions crates/nu-command/src/filters/roll/roll_left.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ impl Command for RollLeft {
"roll left"
}

fn search_terms(&self) -> Vec<&str> {
vec!["rotate", "shift", "move", "column"]
}

fn signature(&self) -> Signature {
Signature::build(self.name())
.named(
Expand Down
4 changes: 4 additions & 0 deletions crates/nu-command/src/filters/roll/roll_right.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ impl Command for RollRight {
"roll right"
}

fn search_terms(&self) -> Vec<&str> {
vec!["rotate", "shift", "move", "column"]
}

fn signature(&self) -> Signature {
Signature::build(self.name())
.named(
Expand Down
4 changes: 4 additions & 0 deletions crates/nu-command/src/filters/roll/roll_up.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ impl Command for RollUp {
"roll up"
}

fn search_terms(&self) -> Vec<&str> {
vec!["rotate", "shift", "move", "row"]
}

fn signature(&self) -> Signature {
Signature::build(self.name())
.named("by", SyntaxShape::Int, "Number of rows to roll", Some('b'))
Expand Down

0 comments on commit f3957fd

Please sign in to comment.