-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
/
Copy pathbroot.ts
224 lines (224 loc) · 6.71 KB
/
broot.ts
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
const completionSpec: Fig.Spec = {
name: "broot",
description:
"Broot lets you explore file hierarchies with a tree-like view, manipulate files, launch actions, and define your own shortcuts. broot is best launched as br: this shell function gives you access to more commands, especially cd. The br shell function is interactively installed on first broot launch. Flags and options can be classically passed on launch but also written in the configuration file. Each flag has a counter-flag so that you can cancel at command line a flag which has been set in the configuration file",
options: [
{
name: ["--dates", "-d"],
description: "Show the last modified date of files and directories",
exclusiveOn: ["--no-dates", "-D"],
},
{
name: ["--no-dates", "-D"],
description: "Don't show the last modified date",
exclusiveOn: ["--dates", "-d"],
},
{
name: ["--only-folders", "-f"],
description: "Only show folders",
exclusiveOn: ["--no-only-folders", "-F"],
},
{
name: ["--no-only-folders", "-F"],
description: "Show folders and files alike",
exclusiveOn: ["--only-folders", "-f"],
},
{
name: "--show-root-fs",
description: "Show filesystem info on top",
},
{
name: ["--show-git-info", "-g"],
description: "Show git statuses on files and stats of repository",
exclusiveOn: ["--no-show-git-info", "-G"],
},
{
name: ["--no-show-git-info", "-G"],
description: "Don't show git statuses on files nor stats",
exclusiveOn: ["--show-git-info", "-g"],
},
{
name: "--git-status",
description:
"Only show files having an interesting git status, including hidden ones",
},
{
name: ["--hidden", "-h"],
description: "Show hidden files",
exclusiveOn: ["--no-hidden", "-H"],
},
{
name: ["--no-hidden", "-H"],
description: "Don't show hidden files",
exclusiveOn: ["--hidden", "-h"],
},
{
name: ["--show-gitignored", "-i"],
description: "Show files which should be ignored according to git",
exclusiveOn: ["--no-show-gitignored", "-I"],
},
{
name: ["--no-show-gitignored", "-I"],
description: "Don't show gitignored files",
exclusiveOn: ["--show-gitignored", "-i"],
},
{
name: ["--permissions", "-p"],
description: "Show permissions with owner and group",
exclusiveOn: ["--no-permissions", "-P"],
},
{
name: ["--no-permissions", "-P"],
description: "Don't show permissions",
exclusiveOn: ["--permissions", "-p"],
},
{
name: ["--sizes", "-s"],
description:
"Show the sizes of files and directories. When this mode is on, children aren't shown so that the biggest entries at the selected level can be sorted first",
exclusiveOn: ["--no-sizes", "-S"],
},
{
name: ["--no-sizes", "-S"],
description: "Don't show sizes",
exclusiveOn: ["--sizes", "-s"],
},
{
name: "--sort-by-count",
description: "Sort by count (only show one level of the tree)",
exclusiveOn: ["--no-sort"],
},
{
name: "--sort-by-date",
description: "Sort by date (only show one level of the tree)",
exclusiveOn: ["--no-sort"],
},
{
name: "--sort-by-size",
description: "Sort by size (only show one level of the tree)",
exclusiveOn: ["--no-sort"],
},
{
name: ["--whale-spotting", "-w"],
description: "Sort by size, show ignored and hidden files",
},
{
name: "--no-sort",
description: "Don't sort",
exclusiveOn: ["--sort-by-count", "--sort-by-date", "--sort-by-size"],
},
{
name: ["--trim-root", "-t"],
description:
"Trim the root: remove elements which would exceed the screen size. This removes the scrollbar",
exclusiveOn: ["--no-trim-root", "-T"],
},
{
name: ["--no-trim-root", "-T"],
description:
"Don't trim the root (still trim the deeper levels). A scrollbar may be used when there are too many elements to show on screen",
exclusiveOn: ["--trim-root", "-t"],
},
{
name: "--install",
description: "Install or reinstall the br shell function",
},
{
name: "--get-root",
description: "Ask for the current root of the remote broot",
},
{
name: "--color",
description:
"Controls styling of the output (default: auto). If set to auto, all styling is removed when output is piped",
args: {
suggestions: ["yes", "no", "auto"],
isOptional: true,
},
},
{
name: "--help",
description:
"Prints a help page, with more or less the same content as this man page",
},
{
name: ["--version", "-v"],
description: "Prints the version of broot",
},
{
name: "--outcmd",
description: "Where to write a command if broot produces one",
args: {
name: "cmd-export-path",
},
},
{
name: ["--cmd", "-c"],
description: "Semicolon separated commands to execute on start of broot",
args: {
name: "commands",
},
},
{
name: "--conf",
description: "Semicolon separated paths to specific config files",
args: {
name: "conf",
},
},
{
name: "--height",
description:
"Height to use if you don't want to fill the screen or for file export (by default the terminal height is used)",
args: {
name: "height",
},
},
{
name: ["--out", "-o"],
description: "Where to write the produced path, if any",
args: {
name: "file-export-path",
template: "filepaths",
suggestCurrentToken: true,
},
},
{
name: "--set-install-state",
description:
"Set the installation state. This is mostly useful in installation scripts to override the normal installation process",
args: {
name: "state",
suggestions: ["undefined", "refused", "installed"],
},
},
{
name: "--print-shell-function",
description:
"Print to stdout the br function for the given shell. This can be used in your own installation process overriden the standard one",
args: {
name: "shell",
suggestions: ["bash", "fish", "zsh"],
},
},
{
name: "--listen",
description: "Listen for commands",
args: {
name: "listen",
},
},
{
name: "--send",
description: "Send commands to a remote broot then quits",
args: {
name: "send",
},
},
],
args: {
name: "ROOT",
description: "Sets the root directory",
},
};
export default completionSpec;