mirror of
https://github.com/nushell/nushell
synced 2024-12-27 05:23:11 +00:00
Rename bat -> view
This commit is contained in:
parent
447356cb96
commit
2e2831de95
4 changed files with 5 additions and 5 deletions
|
@ -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;
|
||||||
|
|
|
@ -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
|
|
@ -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)),
|
||||||
|
|
|
@ -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",
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue