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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
|
/// this module generate the clap App, which defines
/// launch arguments
use {
clap,
};
/// declare the possible CLI arguments, and gets the values
pub fn clap_app() -> clap::App<'static, 'static> {
clap::App::new("broot")
.version(env!("CARGO_PKG_VERSION"))
.author("dystroy <denys.seguret@gmail.com>")
.about("Balanced tree view + fuzzy search + BFS + customizable launcher")
.arg(clap::Arg::with_name("root").help("sets the root directory"))
.arg(
clap::Arg::with_name("cmd_export_path")
.long("outcmd")
.takes_value(true)
.help("where to write the produced cmd (if any)"),
)
.arg(
clap::Arg::with_name("commands")
.short("c")
.long("cmd")
.takes_value(true)
.help("semicolon separated commands to execute (experimental)"),
)
.arg(
clap::Arg::with_name("dates")
.short("d")
.long("dates")
.help("show the last modified date of files and directories"),
)
.arg(
clap::Arg::with_name("file_export_path")
.short("o")
.long("out")
.takes_value(true)
.help("where to write the produced path (if any)"),
)
.arg(
clap::Arg::with_name("gitignore")
.short("g")
.long("gitignore")
.takes_value(true)
.help("respect .gitignore rules (yes, no, auto)"),
)
.arg(
clap::Arg::with_name("height")
.long("height")
.help("height (if you don't want to fill the screen or for file export)")
.takes_value(true),
)
.arg(
clap::Arg::with_name("hidden")
.short("h")
.long("hidden")
.help("show hidden files"),
)
.arg(
clap::Arg::with_name("install")
.long("install")
.help("install or reinstall the br shell function"),
)
.arg(
clap::Arg::with_name("no-style")
.long("no-style")
.help("whether to remove all style and colors"),
)
.arg(
clap::Arg::with_name("only-folders")
.short("f")
.long("only-folders")
.help("only show folders"),
)
.arg(
clap::Arg::with_name("permissions")
.short("p")
.long("permissions")
.help("show permissions, with owner and group"),
)
.arg(
clap::Arg::with_name("set-install-state")
.long("set-install-state")
.takes_value(true)
.possible_values(&["undefined", "refused", "installed"])
.help("set the installation state (for use in install script)"),
)
.arg(
clap::Arg::with_name("print-shell-function")
.long("print-shell-function")
.takes_value(true)
.help("print to stdout the br function for a given shell"),
)
.arg(
clap::Arg::with_name("sizes")
.short("s")
.long("sizes")
.help("show the size of files and directories"),
)
}
|