1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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: 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: bool,
    #[allow(unused)]
    pub trash: bool,
    #[allow(unused)]
    pub permanent: bool,
    pub force: bool,
}