nushell/crates/nu-engine/src/shell/shell_args.rs
Jonathan Turner 93e8f6c05e
Split nu-cli into nu-cli/nu-engine (#2898)
We split off the evaluation engine part of nu-cli into its own crate. This helps improve build times for nu-cli by 17% in my tests. It also helps us see a bit better what's the core engine portion vs the part specific to the interactive CLI piece.

There's more than can be done here, but I think it's a good start in the right direction.
2021-01-10 15:50:49 +13:00

51 lines
1.0 KiB
Rust

use nu_source::Tagged;
use serde::{self, Deserialize};
use std::path::PathBuf;
#[derive(Deserialize)]
pub struct CdArgs {
pub path: Option<Tagged<PathBuf>>,
}
#[derive(Deserialize)]
pub struct CopyArgs {
pub src: Tagged<PathBuf>,
pub dst: Tagged<PathBuf>,
pub recursive: Tagged<bool>,
}
#[derive(Deserialize)]
pub struct LsArgs {
pub path: Option<Tagged<PathBuf>>,
pub all: bool,
pub long: bool,
#[serde(rename = "short-names")]
pub short_names: bool,
#[serde(rename = "du")]
pub du: bool,
}
#[derive(Deserialize)]
pub struct MvArgs {
pub src: Tagged<PathBuf>,
pub dst: Tagged<PathBuf>,
}
#[derive(Deserialize)]
pub struct MkdirArgs {
pub rest: Vec<Tagged<PathBuf>>,
#[serde(rename = "show-created-paths")]
pub show_created_paths: bool,
}
#[derive(Deserialize)]
pub struct RemoveArgs {
pub rest: Vec<Tagged<PathBuf>>,
pub recursive: Tagged<bool>,
#[allow(unused)]
pub trash: Tagged<bool>,
#[allow(unused)]
pub permanent: Tagged<bool>,
pub force: Tagged<bool>,
}