mirror of
https://github.com/nushell/nushell.git
synced 2024-11-24 17:34:00 +01:00
commit
ab3e883cef
@ -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 New Issue
Block a user