Merge pull request #10 from jonathandturner/view

Rename bat -> view
This commit is contained in:
Jonathan Turner 2019-05-18 07:16:20 -07:00 committed by GitHub
commit ab3e883cef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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",
]; ];