Rename bat -> view

This commit is contained in:
Jonathan Turner 2019-05-18 07:15:22 -07:00
parent 447356cb96
commit 2e2831de95
4 changed files with 5 additions and 5 deletions

View file

@ -1,5 +1,4 @@
crate mod args; crate mod args;
crate mod bat;
crate mod cd; crate mod cd;
crate mod command; crate mod command;
crate mod ls; crate mod ls;
@ -10,6 +9,7 @@ crate mod skip;
crate mod sort_by; crate mod sort_by;
crate mod take; crate mod take;
crate mod to_array; crate mod to_array;
crate mod view;
crate mod where_; crate mod where_;
crate use to_array::to_array; crate use to_array::to_array;

View file

@ -4,9 +4,9 @@ use derive_new::new;
use prettyprint::PrettyPrinter; use prettyprint::PrettyPrinter;
#[derive(new)] #[derive(new)]
pub struct Bat; pub struct View;
impl crate::Command for Bat { impl crate::Command for View {
fn run(&self, args: CommandArgs<'caller>) -> Result<VecDeque<ReturnValue>, ShellError> { fn run(&self, args: CommandArgs<'caller>) -> Result<VecDeque<ReturnValue>, ShellError> {
let target = match args.args.first() { let target = match args.args.first() {
// TODO: This needs better infra // TODO: This needs better infra

View file

@ -68,7 +68,7 @@ fn main() -> Result<(), Box<Error>> {
("ps", Box::new(ps::Ps)), ("ps", Box::new(ps::Ps)),
("ls", Box::new(ls::Ls)), ("ls", Box::new(ls::Ls)),
("cd", Box::new(cd::Cd)), ("cd", Box::new(cd::Cd)),
("bat", Box::new(bat::Bat)), ("view", Box::new(view::View)),
("skip", Box::new(skip::Skip)), ("skip", Box::new(skip::Skip)),
("take", Box::new(take::Take)), ("take", Box::new(take::Take)),
("select", Box::new(select::Select)), ("select", Box::new(select::Select)),

View file

@ -16,7 +16,7 @@ impl Completer for NuCompleter {
context: &rustyline::Context, context: &rustyline::Context,
) -> rustyline::Result<(usize, Vec<completion::Pair>)> { ) -> rustyline::Result<(usize, Vec<completion::Pair>)> {
let commands = [ let commands = [
"ps", "ls", "cd", "bat", "skip", "take", "select", "reject", "to-array", "where", "ps", "ls", "cd", "view", "skip", "take", "select", "reject", "to-array", "where",
"sort-by", "sort-by",
]; ];