From 2e2831de958c721214b6d9d7ba2abd91c607c6b5 Mon Sep 17 00:00:00 2001 From: Jonathan Turner Date: Sat, 18 May 2019 07:15:22 -0700 Subject: [PATCH] Rename bat -> view --- src/commands.rs | 2 +- src/commands/{bat.rs => view.rs} | 4 ++-- src/main.rs | 2 +- src/shell/completer.rs | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) rename src/commands/{bat.rs => view.rs} (94%) diff --git a/src/commands.rs b/src/commands.rs index 0f0f96f98..109f08be7 100644 --- a/src/commands.rs +++ b/src/commands.rs @@ -1,5 +1,4 @@ crate mod args; -crate mod bat; crate mod cd; crate mod command; crate mod ls; @@ -10,6 +9,7 @@ crate mod skip; crate mod sort_by; crate mod take; crate mod to_array; +crate mod view; crate mod where_; crate use to_array::to_array; diff --git a/src/commands/bat.rs b/src/commands/view.rs similarity index 94% rename from src/commands/bat.rs rename to src/commands/view.rs index 066d6610a..b7b0023f9 100644 --- a/src/commands/bat.rs +++ b/src/commands/view.rs @@ -4,9 +4,9 @@ use derive_new::new; use prettyprint::PrettyPrinter; #[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, ShellError> { let target = match args.args.first() { // TODO: This needs better infra diff --git a/src/main.rs b/src/main.rs index b65a4fd86..4d97f4da2 100644 --- a/src/main.rs +++ b/src/main.rs @@ -68,7 +68,7 @@ fn main() -> Result<(), Box> { ("ps", Box::new(ps::Ps)), ("ls", Box::new(ls::Ls)), ("cd", Box::new(cd::Cd)), - ("bat", Box::new(bat::Bat)), + ("view", Box::new(view::View)), ("skip", Box::new(skip::Skip)), ("take", Box::new(take::Take)), ("select", Box::new(select::Select)), diff --git a/src/shell/completer.rs b/src/shell/completer.rs index 786ed09bb..f3912ca67 100644 --- a/src/shell/completer.rs +++ b/src/shell/completer.rs @@ -16,7 +16,7 @@ impl Completer for NuCompleter { context: &rustyline::Context, ) -> rustyline::Result<(usize, Vec)> { 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", ];