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 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;

View File

@ -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<VecDeque<ReturnValue>, ShellError> {
let target = match args.args.first() {
// TODO: This needs better infra

View File

@ -68,7 +68,7 @@ fn main() -> Result<(), Box<Error>> {
("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)),

View File

@ -16,7 +16,7 @@ impl Completer for NuCompleter {
context: &rustyline::Context,
) -> rustyline::Result<(usize, Vec<completion::Pair>)> {
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",
];