@libtmux/workspace-cli 0.1.0-alpha.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +330 -0
- package/THIRD-PARTY-NOTICES.md +183 -0
- package/dist/app-w7cbtf0n.js +747 -0
- package/dist/completions-2a9fqwq3.js +282 -0
- package/dist/extensions-8v6mfszj.js +268 -0
- package/dist/index-0j386v40.js +7112 -0
- package/dist/main-1de529jm.js +37 -0
- package/dist/main-bfnr2nkj.js +3106 -0
- package/dist/main-c8atq2pj.js +470 -0
- package/dist/main-gh3pafqb.js +369 -0
- package/dist/main.js +35 -0
- package/dist/progress-n08zapg2.js +1649 -0
- package/dist/reference-ebfxh6yp.js +90 -0
- package/dist/tmux-wa2zn8z1.js +893 -0
- package/docs/command-reference.md +227 -0
- package/docs/commands.json +1125 -0
- package/docs/completions/_tmux-workspace +239 -0
- package/docs/completions/tmux-workspace.bash +257 -0
- package/docs/completions/tmux-workspace.fish +430 -0
- package/package.json +49 -0
|
@@ -0,0 +1,430 @@
|
|
|
1
|
+
function _tmux_workspace_lookup
|
|
2
|
+
switch "$argv[1]:$argv[2]"
|
|
3
|
+
case '0:-V' '0:--version'
|
|
4
|
+
printf '%s\n' 'none' '_' '0' '-1'
|
|
5
|
+
case '0:--log-level'
|
|
6
|
+
printf '%s\n' 'required' '_' '0' '-1' 'debug' 'info' 'warning' 'error' 'critical'
|
|
7
|
+
case '0:--color'
|
|
8
|
+
printf '%s\n' 'required' '_' '0' '-1' 'auto' 'always' 'never'
|
|
9
|
+
case '0:--json'
|
|
10
|
+
printf '%s\n' 'none' '_' '0' '-1'
|
|
11
|
+
case '0:--ndjson'
|
|
12
|
+
printf '%s\n' 'none' '_' '0' '-1'
|
|
13
|
+
case '0:-h' '0:--help'
|
|
14
|
+
printf '%s\n' 'none' '_' '0' '-1'
|
|
15
|
+
case '0:>load'
|
|
16
|
+
printf '%s\n' 'command' '_' '0' '1'
|
|
17
|
+
case '0:>shell'
|
|
18
|
+
printf '%s\n' 'command' '_' '0' '2'
|
|
19
|
+
case '0:>import'
|
|
20
|
+
printf '%s\n' 'command' '_' '0' '3'
|
|
21
|
+
case '0:>convert'
|
|
22
|
+
printf '%s\n' 'command' '_' '0' '6'
|
|
23
|
+
case '0:>debug-info'
|
|
24
|
+
printf '%s\n' 'command' '_' '0' '7'
|
|
25
|
+
case '0:>ls'
|
|
26
|
+
printf '%s\n' 'command' '_' '0' '8'
|
|
27
|
+
case '0:>search'
|
|
28
|
+
printf '%s\n' 'command' '_' '0' '9'
|
|
29
|
+
case '0:>edit'
|
|
30
|
+
printf '%s\n' 'command' '_' '0' '10'
|
|
31
|
+
case '0:>freeze'
|
|
32
|
+
printf '%s\n' 'command' '_' '0' '11'
|
|
33
|
+
case '0:>completion'
|
|
34
|
+
printf '%s\n' 'command' '_' '0' '12'
|
|
35
|
+
case '0:flags'
|
|
36
|
+
printf '%s\n' 'flags' '_' '0' '-1' '-V' '--version' '--log-level' '--color' '--json' '--ndjson' '-h' '--help'
|
|
37
|
+
case '0:commands'
|
|
38
|
+
printf '%s\n' 'commands' '_' '0' '-1' 'load' 'shell' 'import' 'convert' 'debug-info' 'ls' 'search' 'edit' 'freeze' 'completion'
|
|
39
|
+
case '1:-L'
|
|
40
|
+
printf '%s\n' 'required' '_' '0' '-1'
|
|
41
|
+
case '1:-S'
|
|
42
|
+
printf '%s\n' 'required' 'file' '0' '-1'
|
|
43
|
+
case '1:-f'
|
|
44
|
+
printf '%s\n' 'required' 'file' '0' '-1'
|
|
45
|
+
case '1:-s'
|
|
46
|
+
printf '%s\n' 'required' '_' '0' '-1'
|
|
47
|
+
case '1:-y' '1:--yes'
|
|
48
|
+
printf '%s\n' 'none' '_' '0' '-1'
|
|
49
|
+
case '1:-d'
|
|
50
|
+
printf '%s\n' 'none' '_' '0' '-1'
|
|
51
|
+
case '1:-a' '1:--append'
|
|
52
|
+
printf '%s\n' 'none' '_' '0' '-1'
|
|
53
|
+
case '1:-2'
|
|
54
|
+
printf '%s\n' 'none' '_' '0' '-1'
|
|
55
|
+
case '1:-8'
|
|
56
|
+
printf '%s\n' 'none' '_' '0' '-1'
|
|
57
|
+
case '1:--log-file'
|
|
58
|
+
printf '%s\n' 'required' 'file' '0' '-1'
|
|
59
|
+
case '1:--progress-format'
|
|
60
|
+
printf '%s\n' 'required' '_' '0' '-1'
|
|
61
|
+
case '1:--progress-lines'
|
|
62
|
+
printf '%s\n' 'required' '_' '0' '-1'
|
|
63
|
+
case '1:--no-progress'
|
|
64
|
+
printf '%s\n' 'none' '_' '0' '-1'
|
|
65
|
+
case '1:--json'
|
|
66
|
+
printf '%s\n' 'none' '_' '0' '-1'
|
|
67
|
+
case '1:--ndjson'
|
|
68
|
+
printf '%s\n' 'none' '_' '0' '-1'
|
|
69
|
+
case '1:--color'
|
|
70
|
+
printf '%s\n' 'required' '_' '0' '-1' 'auto' 'always' 'never'
|
|
71
|
+
case '1:-h' '1:--help'
|
|
72
|
+
printf '%s\n' 'none' '_' '0' '-1'
|
|
73
|
+
case '1:@0'
|
|
74
|
+
printf '%s\n' 'argument' 'file' '1' '-1'
|
|
75
|
+
case '1:flags'
|
|
76
|
+
printf '%s\n' 'flags' '_' '0' '-1' '-L' '-S' '-f' '-s' '-y' '--yes' '-d' '-a' '--append' '-2' '-8' '--log-file' '--progress-format' '--progress-lines' '--no-progress' '--json' '--ndjson' '--color' '-h' '--help'
|
|
77
|
+
case '1:commands'
|
|
78
|
+
printf '%s\n' 'commands' '_' '0' '-1'
|
|
79
|
+
case '2:-S'
|
|
80
|
+
printf '%s\n' 'required' 'file' '0' '-1'
|
|
81
|
+
case '2:-L'
|
|
82
|
+
printf '%s\n' 'required' '_' '0' '-1'
|
|
83
|
+
case '2:-c'
|
|
84
|
+
printf '%s\n' 'required' '_' '0' '-1'
|
|
85
|
+
case '2:--best'
|
|
86
|
+
printf '%s\n' 'none' '_' '0' '-1'
|
|
87
|
+
case '2:--pdb'
|
|
88
|
+
printf '%s\n' 'none' '_' '0' '-1'
|
|
89
|
+
case '2:--code'
|
|
90
|
+
printf '%s\n' 'none' '_' '0' '-1'
|
|
91
|
+
case '2:--ptipython'
|
|
92
|
+
printf '%s\n' 'none' '_' '0' '-1'
|
|
93
|
+
case '2:--ptpython'
|
|
94
|
+
printf '%s\n' 'none' '_' '0' '-1'
|
|
95
|
+
case '2:--ipython'
|
|
96
|
+
printf '%s\n' 'none' '_' '0' '-1'
|
|
97
|
+
case '2:--bpython'
|
|
98
|
+
printf '%s\n' 'none' '_' '0' '-1'
|
|
99
|
+
case '2:--use-pythonrc'
|
|
100
|
+
printf '%s\n' 'none' '_' '0' '-1'
|
|
101
|
+
case '2:--no-startup'
|
|
102
|
+
printf '%s\n' 'none' '_' '0' '-1'
|
|
103
|
+
case '2:--use-vi-mode'
|
|
104
|
+
printf '%s\n' 'none' '_' '0' '-1'
|
|
105
|
+
case '2:--no-vi-mode'
|
|
106
|
+
printf '%s\n' 'none' '_' '0' '-1'
|
|
107
|
+
case '2:--json'
|
|
108
|
+
printf '%s\n' 'none' '_' '0' '-1'
|
|
109
|
+
case '2:--ndjson'
|
|
110
|
+
printf '%s\n' 'none' '_' '0' '-1'
|
|
111
|
+
case '2:--color'
|
|
112
|
+
printf '%s\n' 'required' '_' '0' '-1' 'auto' 'always' 'never'
|
|
113
|
+
case '2:-h' '2:--help'
|
|
114
|
+
printf '%s\n' 'none' '_' '0' '-1'
|
|
115
|
+
case '2:@0'
|
|
116
|
+
printf '%s\n' 'argument' '_' '0' '-1'
|
|
117
|
+
case '2:@1'
|
|
118
|
+
printf '%s\n' 'argument' '_' '0' '-1'
|
|
119
|
+
case '2:flags'
|
|
120
|
+
printf '%s\n' 'flags' '_' '0' '-1' '-S' '-L' '-c' '--best' '--pdb' '--code' '--ptipython' '--ptpython' '--ipython' '--bpython' '--use-pythonrc' '--no-startup' '--use-vi-mode' '--no-vi-mode' '--json' '--ndjson' '--color' '-h' '--help'
|
|
121
|
+
case '2:commands'
|
|
122
|
+
printf '%s\n' 'commands' '_' '0' '-1'
|
|
123
|
+
case '3:--json'
|
|
124
|
+
printf '%s\n' 'none' '_' '0' '-1'
|
|
125
|
+
case '3:--ndjson'
|
|
126
|
+
printf '%s\n' 'none' '_' '0' '-1'
|
|
127
|
+
case '3:--color'
|
|
128
|
+
printf '%s\n' 'required' '_' '0' '-1' 'auto' 'always' 'never'
|
|
129
|
+
case '3:-h' '3:--help'
|
|
130
|
+
printf '%s\n' 'none' '_' '0' '-1'
|
|
131
|
+
case '3:>teamocil'
|
|
132
|
+
printf '%s\n' 'command' '_' '0' '4'
|
|
133
|
+
case '3:>tmuxinator'
|
|
134
|
+
printf '%s\n' 'command' '_' '0' '5'
|
|
135
|
+
case '3:flags'
|
|
136
|
+
printf '%s\n' 'flags' '_' '0' '-1' '--json' '--ndjson' '--color' '-h' '--help'
|
|
137
|
+
case '3:commands'
|
|
138
|
+
printf '%s\n' 'commands' '_' '0' '-1' 'teamocil' 'tmuxinator'
|
|
139
|
+
case '4:--json'
|
|
140
|
+
printf '%s\n' 'none' '_' '0' '-1'
|
|
141
|
+
case '4:--ndjson'
|
|
142
|
+
printf '%s\n' 'none' '_' '0' '-1'
|
|
143
|
+
case '4:--color'
|
|
144
|
+
printf '%s\n' 'required' '_' '0' '-1' 'auto' 'always' 'never'
|
|
145
|
+
case '4:--save-to'
|
|
146
|
+
printf '%s\n' 'required' 'file' '0' '-1'
|
|
147
|
+
case '4:--workspace-format'
|
|
148
|
+
printf '%s\n' 'required' '_' '0' '-1' 'yaml' 'json'
|
|
149
|
+
case '4:--force'
|
|
150
|
+
printf '%s\n' 'none' '_' '0' '-1'
|
|
151
|
+
case '4:-h' '4:--help'
|
|
152
|
+
printf '%s\n' 'none' '_' '0' '-1'
|
|
153
|
+
case '4:@0'
|
|
154
|
+
printf '%s\n' 'argument' 'file' '0' '-1'
|
|
155
|
+
case '4:flags'
|
|
156
|
+
printf '%s\n' 'flags' '_' '0' '-1' '--json' '--ndjson' '--color' '--save-to' '--workspace-format' '--force' '-h' '--help'
|
|
157
|
+
case '4:commands'
|
|
158
|
+
printf '%s\n' 'commands' '_' '0' '-1'
|
|
159
|
+
case '5:--json'
|
|
160
|
+
printf '%s\n' 'none' '_' '0' '-1'
|
|
161
|
+
case '5:--ndjson'
|
|
162
|
+
printf '%s\n' 'none' '_' '0' '-1'
|
|
163
|
+
case '5:--color'
|
|
164
|
+
printf '%s\n' 'required' '_' '0' '-1' 'auto' 'always' 'never'
|
|
165
|
+
case '5:--save-to'
|
|
166
|
+
printf '%s\n' 'required' 'file' '0' '-1'
|
|
167
|
+
case '5:--workspace-format'
|
|
168
|
+
printf '%s\n' 'required' '_' '0' '-1' 'yaml' 'json'
|
|
169
|
+
case '5:--force'
|
|
170
|
+
printf '%s\n' 'none' '_' '0' '-1'
|
|
171
|
+
case '5:-h' '5:--help'
|
|
172
|
+
printf '%s\n' 'none' '_' '0' '-1'
|
|
173
|
+
case '5:@0'
|
|
174
|
+
printf '%s\n' 'argument' 'file' '0' '-1'
|
|
175
|
+
case '5:flags'
|
|
176
|
+
printf '%s\n' 'flags' '_' '0' '-1' '--json' '--ndjson' '--color' '--save-to' '--workspace-format' '--force' '-h' '--help'
|
|
177
|
+
case '5:commands'
|
|
178
|
+
printf '%s\n' 'commands' '_' '0' '-1'
|
|
179
|
+
case '6:-y' '6:--yes'
|
|
180
|
+
printf '%s\n' 'none' '_' '0' '-1'
|
|
181
|
+
case '6:--json'
|
|
182
|
+
printf '%s\n' 'none' '_' '0' '-1'
|
|
183
|
+
case '6:--ndjson'
|
|
184
|
+
printf '%s\n' 'none' '_' '0' '-1'
|
|
185
|
+
case '6:--color'
|
|
186
|
+
printf '%s\n' 'required' '_' '0' '-1' 'auto' 'always' 'never'
|
|
187
|
+
case '6:--save-to'
|
|
188
|
+
printf '%s\n' 'required' 'file' '0' '-1'
|
|
189
|
+
case '6:--workspace-format'
|
|
190
|
+
printf '%s\n' 'required' '_' '0' '-1' 'yaml' 'json'
|
|
191
|
+
case '6:--force'
|
|
192
|
+
printf '%s\n' 'none' '_' '0' '-1'
|
|
193
|
+
case '6:-h' '6:--help'
|
|
194
|
+
printf '%s\n' 'none' '_' '0' '-1'
|
|
195
|
+
case '6:@0'
|
|
196
|
+
printf '%s\n' 'argument' 'file' '0' '-1'
|
|
197
|
+
case '6:flags'
|
|
198
|
+
printf '%s\n' 'flags' '_' '0' '-1' '-y' '--yes' '--json' '--ndjson' '--color' '--save-to' '--workspace-format' '--force' '-h' '--help'
|
|
199
|
+
case '6:commands'
|
|
200
|
+
printf '%s\n' 'commands' '_' '0' '-1'
|
|
201
|
+
case '7:--json'
|
|
202
|
+
printf '%s\n' 'none' '_' '0' '-1'
|
|
203
|
+
case '7:--ndjson'
|
|
204
|
+
printf '%s\n' 'none' '_' '0' '-1'
|
|
205
|
+
case '7:--color'
|
|
206
|
+
printf '%s\n' 'required' '_' '0' '-1' 'auto' 'always' 'never'
|
|
207
|
+
case '7:-h' '7:--help'
|
|
208
|
+
printf '%s\n' 'none' '_' '0' '-1'
|
|
209
|
+
case '7:flags'
|
|
210
|
+
printf '%s\n' 'flags' '_' '0' '-1' '--json' '--ndjson' '--color' '-h' '--help'
|
|
211
|
+
case '7:commands'
|
|
212
|
+
printf '%s\n' 'commands' '_' '0' '-1'
|
|
213
|
+
case '8:--tree'
|
|
214
|
+
printf '%s\n' 'none' '_' '0' '-1'
|
|
215
|
+
case '8:--json'
|
|
216
|
+
printf '%s\n' 'none' '_' '0' '-1'
|
|
217
|
+
case '8:--ndjson'
|
|
218
|
+
printf '%s\n' 'none' '_' '0' '-1'
|
|
219
|
+
case '8:--full'
|
|
220
|
+
printf '%s\n' 'none' '_' '0' '-1'
|
|
221
|
+
case '8:--color'
|
|
222
|
+
printf '%s\n' 'required' '_' '0' '-1' 'auto' 'always' 'never'
|
|
223
|
+
case '8:-h' '8:--help'
|
|
224
|
+
printf '%s\n' 'none' '_' '0' '-1'
|
|
225
|
+
case '8:flags'
|
|
226
|
+
printf '%s\n' 'flags' '_' '0' '-1' '--tree' '--json' '--ndjson' '--full' '--color' '-h' '--help'
|
|
227
|
+
case '8:commands'
|
|
228
|
+
printf '%s\n' 'commands' '_' '0' '-1'
|
|
229
|
+
case '9:-f' '9:--field'
|
|
230
|
+
printf '%s\n' 'required' '_' '0' '-1'
|
|
231
|
+
case '9:-i' '9:--ignore-case'
|
|
232
|
+
printf '%s\n' 'none' '_' '0' '-1'
|
|
233
|
+
case '9:-S' '9:--smart-case'
|
|
234
|
+
printf '%s\n' 'none' '_' '0' '-1'
|
|
235
|
+
case '9:-F' '9:--fixed-strings'
|
|
236
|
+
printf '%s\n' 'none' '_' '0' '-1'
|
|
237
|
+
case '9:-w' '9:--word-regexp'
|
|
238
|
+
printf '%s\n' 'none' '_' '0' '-1'
|
|
239
|
+
case '9:-v' '9:--invert-match'
|
|
240
|
+
printf '%s\n' 'none' '_' '0' '-1'
|
|
241
|
+
case '9:--any'
|
|
242
|
+
printf '%s\n' 'none' '_' '0' '-1'
|
|
243
|
+
case '9:--json'
|
|
244
|
+
printf '%s\n' 'none' '_' '0' '-1'
|
|
245
|
+
case '9:--ndjson'
|
|
246
|
+
printf '%s\n' 'none' '_' '0' '-1'
|
|
247
|
+
case '9:--color'
|
|
248
|
+
printf '%s\n' 'required' '_' '0' '-1' 'auto' 'always' 'never'
|
|
249
|
+
case '9:-h' '9:--help'
|
|
250
|
+
printf '%s\n' 'none' '_' '0' '-1'
|
|
251
|
+
case '9:@0'
|
|
252
|
+
printf '%s\n' 'argument' '_' '1' '-1'
|
|
253
|
+
case '9:flags'
|
|
254
|
+
printf '%s\n' 'flags' '_' '0' '-1' '-f' '--field' '-i' '--ignore-case' '-S' '--smart-case' '-F' '--fixed-strings' '-w' '--word-regexp' '-v' '--invert-match' '--any' '--json' '--ndjson' '--color' '-h' '--help'
|
|
255
|
+
case '9:commands'
|
|
256
|
+
printf '%s\n' 'commands' '_' '0' '-1'
|
|
257
|
+
case '10:--json'
|
|
258
|
+
printf '%s\n' 'none' '_' '0' '-1'
|
|
259
|
+
case '10:--ndjson'
|
|
260
|
+
printf '%s\n' 'none' '_' '0' '-1'
|
|
261
|
+
case '10:--color'
|
|
262
|
+
printf '%s\n' 'required' '_' '0' '-1' 'auto' 'always' 'never'
|
|
263
|
+
case '10:-h' '10:--help'
|
|
264
|
+
printf '%s\n' 'none' '_' '0' '-1'
|
|
265
|
+
case '10:@0'
|
|
266
|
+
printf '%s\n' 'argument' 'file' '0' '-1'
|
|
267
|
+
case '10:flags'
|
|
268
|
+
printf '%s\n' 'flags' '_' '0' '-1' '--json' '--ndjson' '--color' '-h' '--help'
|
|
269
|
+
case '10:commands'
|
|
270
|
+
printf '%s\n' 'commands' '_' '0' '-1'
|
|
271
|
+
case '11:-S'
|
|
272
|
+
printf '%s\n' 'required' 'file' '0' '-1'
|
|
273
|
+
case '11:-L'
|
|
274
|
+
printf '%s\n' 'required' '_' '0' '-1'
|
|
275
|
+
case '11:-f' '11:--workspace-format'
|
|
276
|
+
printf '%s\n' 'required' '_' '0' '-1' 'yaml' 'json'
|
|
277
|
+
case '11:-o' '11:--save-to'
|
|
278
|
+
printf '%s\n' 'required' 'file' '0' '-1'
|
|
279
|
+
case '11:-y' '11:--yes'
|
|
280
|
+
printf '%s\n' 'none' '_' '0' '-1'
|
|
281
|
+
case '11:-q' '11:--quiet'
|
|
282
|
+
printf '%s\n' 'none' '_' '0' '-1'
|
|
283
|
+
case '11:--force'
|
|
284
|
+
printf '%s\n' 'none' '_' '0' '-1'
|
|
285
|
+
case '11:--json'
|
|
286
|
+
printf '%s\n' 'none' '_' '0' '-1'
|
|
287
|
+
case '11:--ndjson'
|
|
288
|
+
printf '%s\n' 'none' '_' '0' '-1'
|
|
289
|
+
case '11:--color'
|
|
290
|
+
printf '%s\n' 'required' '_' '0' '-1' 'auto' 'always' 'never'
|
|
291
|
+
case '11:-h' '11:--help'
|
|
292
|
+
printf '%s\n' 'none' '_' '0' '-1'
|
|
293
|
+
case '11:@0'
|
|
294
|
+
printf '%s\n' 'argument' '_' '0' '-1'
|
|
295
|
+
case '11:flags'
|
|
296
|
+
printf '%s\n' 'flags' '_' '0' '-1' '-S' '-L' '-f' '--workspace-format' '-o' '--save-to' '-y' '--yes' '-q' '--quiet' '--force' '--json' '--ndjson' '--color' '-h' '--help'
|
|
297
|
+
case '11:commands'
|
|
298
|
+
printf '%s\n' 'commands' '_' '0' '-1'
|
|
299
|
+
case '12:--json'
|
|
300
|
+
printf '%s\n' 'none' '_' '0' '-1'
|
|
301
|
+
case '12:--ndjson'
|
|
302
|
+
printf '%s\n' 'none' '_' '0' '-1'
|
|
303
|
+
case '12:--color'
|
|
304
|
+
printf '%s\n' 'required' '_' '0' '-1' 'auto' 'always' 'never'
|
|
305
|
+
case '12:-h' '12:--help'
|
|
306
|
+
printf '%s\n' 'none' '_' '0' '-1'
|
|
307
|
+
case '12:@0'
|
|
308
|
+
printf '%s\n' 'argument' '_' '0' '-1' 'bash' 'zsh' 'fish'
|
|
309
|
+
case '12:flags'
|
|
310
|
+
printf '%s\n' 'flags' '_' '0' '-1' '--json' '--ndjson' '--color' '-h' '--help'
|
|
311
|
+
case '12:commands'
|
|
312
|
+
printf '%s\n' 'commands' '_' '0' '-1'
|
|
313
|
+
case '*'
|
|
314
|
+
printf '%s\n' _ _ 0 -1
|
|
315
|
+
end
|
|
316
|
+
end
|
|
317
|
+
function _tmux_workspace
|
|
318
|
+
set -l words (commandline -opc)
|
|
319
|
+
set -l cur (string unescape -- (commandline -ct))
|
|
320
|
+
set -l node 0
|
|
321
|
+
set -l pos 0
|
|
322
|
+
set -l stop 0
|
|
323
|
+
set -l pending
|
|
324
|
+
set -l info _ _ 0 -1
|
|
325
|
+
set -l prefix ''
|
|
326
|
+
for w in $words[2..-1]
|
|
327
|
+
if test -n "$pending"
|
|
328
|
+
if test "$pending" = required; or not string match -rq -- '^-.' "$w"
|
|
329
|
+
set pending
|
|
330
|
+
if test "$info[3]" = 1; set pending optional; end
|
|
331
|
+
continue
|
|
332
|
+
end
|
|
333
|
+
set pending
|
|
334
|
+
end
|
|
335
|
+
if test $stop = 0; and test "$w" = --
|
|
336
|
+
set stop 1
|
|
337
|
+
continue
|
|
338
|
+
end
|
|
339
|
+
if test $stop = 0; and string match -q -- '--*' "$w"
|
|
340
|
+
set -l key (string split -m 1 = -- "$w")[1]
|
|
341
|
+
set info (_tmux_workspace_lookup $node "$key")
|
|
342
|
+
if contains -- "$info[1]" required optional
|
|
343
|
+
if string match -q '*=*' -- "$w"
|
|
344
|
+
if test "$info[3]" = 1; set pending optional; end
|
|
345
|
+
else
|
|
346
|
+
set pending $info[1]
|
|
347
|
+
end
|
|
348
|
+
end
|
|
349
|
+
continue
|
|
350
|
+
end
|
|
351
|
+
if test $stop = 0; and string match -rq -- '^-.' "$w"
|
|
352
|
+
set -l tail (string sub -s 2 -- "$w")
|
|
353
|
+
while test -n "$tail"
|
|
354
|
+
set -l key -(string sub -l 1 -- "$tail")
|
|
355
|
+
set tail (string sub -s 2 -- "$tail")
|
|
356
|
+
set info (_tmux_workspace_lookup $node "$key")
|
|
357
|
+
if contains -- "$info[1]" required optional
|
|
358
|
+
if test -n "$tail"
|
|
359
|
+
if test "$info[3]" = 1; set pending optional; end
|
|
360
|
+
else
|
|
361
|
+
set pending $info[1]
|
|
362
|
+
end
|
|
363
|
+
break
|
|
364
|
+
end
|
|
365
|
+
end
|
|
366
|
+
continue
|
|
367
|
+
end
|
|
368
|
+
if test $stop = 0; and test $pos = 0
|
|
369
|
+
set info (_tmux_workspace_lookup $node ">$w")
|
|
370
|
+
if test "$info[4]" -ge 0
|
|
371
|
+
set node $info[4]
|
|
372
|
+
set pos 0
|
|
373
|
+
continue
|
|
374
|
+
end
|
|
375
|
+
end
|
|
376
|
+
set info (_tmux_workspace_lookup $node "@$pos")
|
|
377
|
+
if test "$info[3]" != 1; set pos (math $pos + 1); end
|
|
378
|
+
end
|
|
379
|
+
if test "$pending" = optional; and string match -rq -- '^-.' "$cur"; set pending; end
|
|
380
|
+
if test -z "$pending"; and test $stop = 0; and string match -q -- '--*=*' "$cur"
|
|
381
|
+
set -l parts (string split -m 1 = -- "$cur")
|
|
382
|
+
set info (_tmux_workspace_lookup $node "$parts[1]")
|
|
383
|
+
if contains -- "$info[1]" required optional
|
|
384
|
+
set prefix "$parts[1]="
|
|
385
|
+
set cur "$parts[2]"
|
|
386
|
+
set pending $info[1]
|
|
387
|
+
end
|
|
388
|
+
else if test -z "$pending"; and test $stop = 0; and string match -rq -- '^-.' "$cur"; and not string match -q -- '--*' "$cur"
|
|
389
|
+
set -l tail (string sub -s 2 -- "$cur")
|
|
390
|
+
set prefix -
|
|
391
|
+
while test -n "$tail"
|
|
392
|
+
set -l char (string sub -l 1 -- "$tail")
|
|
393
|
+
set prefix "$prefix$char"
|
|
394
|
+
set tail (string sub -s 2 -- "$tail")
|
|
395
|
+
set info (_tmux_workspace_lookup $node "-$char")
|
|
396
|
+
if contains -- "$info[1]" required optional
|
|
397
|
+
set cur "$tail"
|
|
398
|
+
set pending $info[1]
|
|
399
|
+
break
|
|
400
|
+
end
|
|
401
|
+
end
|
|
402
|
+
if test -z "$pending"; set prefix ''; end
|
|
403
|
+
end
|
|
404
|
+
if test -z "$pending"
|
|
405
|
+
if test $stop = 0; and string match -q -- '-*' "$cur"
|
|
406
|
+
set info (_tmux_workspace_lookup $node flags)
|
|
407
|
+
else
|
|
408
|
+
set info (_tmux_workspace_lookup $node "@$pos")
|
|
409
|
+
if test $stop = 0; and test $pos = 0
|
|
410
|
+
set -l children (_tmux_workspace_lookup $node commands)
|
|
411
|
+
set -a info $children[5..-1]
|
|
412
|
+
end
|
|
413
|
+
end
|
|
414
|
+
end
|
|
415
|
+
for candidate in $info[5..-1]
|
|
416
|
+
if test (string sub -l (string length -- "$cur") -- "$candidate") = "$cur"
|
|
417
|
+
printf '%s\n' "$prefix$candidate"
|
|
418
|
+
end
|
|
419
|
+
end
|
|
420
|
+
if contains -- "$info[2]" file directory
|
|
421
|
+
set -l paths (__fish_complete_path (string escape -- "$cur"))
|
|
422
|
+
for path in $paths
|
|
423
|
+
set -l value (string split -m 1 \t -- "$path")[1]
|
|
424
|
+
if test "$info[2]" = file; or string match -q '*/' -- "$value"
|
|
425
|
+
printf '%s\n' "$prefix$value"
|
|
426
|
+
end
|
|
427
|
+
end
|
|
428
|
+
end
|
|
429
|
+
end
|
|
430
|
+
complete -c 'tmux-workspace' -f -a '(_tmux_workspace)'
|
package/package.json
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@libtmux/workspace-cli",
|
|
3
|
+
"version": "0.1.0-alpha.11",
|
|
4
|
+
"description": "A tmuxp-compatible workspace manager for Node and Bun.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/libtmux/libtmux-ts.git",
|
|
9
|
+
"directory": "packages/workspace-cli"
|
|
10
|
+
},
|
|
11
|
+
"bin": {
|
|
12
|
+
"tmux-workspace": "./dist/main.js"
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"dist",
|
|
16
|
+
"docs",
|
|
17
|
+
"THIRD-PARTY-NOTICES.md"
|
|
18
|
+
],
|
|
19
|
+
"type": "module",
|
|
20
|
+
"publishConfig": {
|
|
21
|
+
"access": "public"
|
|
22
|
+
},
|
|
23
|
+
"scripts": {
|
|
24
|
+
"build": "bun run docs:check && bun run notices:check && rm -rf dist && bun build src/main.ts --target node --outdir dist --splitting --external libtmux",
|
|
25
|
+
"docs:generate": "bun scripts/generate-reference.ts",
|
|
26
|
+
"docs:check": "bun scripts/generate-reference.ts --check",
|
|
27
|
+
"notices": "bun scripts/third_party_notices.ts",
|
|
28
|
+
"notices:check": "bun scripts/third_party_notices.ts --check",
|
|
29
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
30
|
+
"test": "bun test tests",
|
|
31
|
+
"test:package": "bun run build && bun scripts/check-install.ts --package-only",
|
|
32
|
+
"test:install": "bun run build && bun scripts/check-install.ts"
|
|
33
|
+
},
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"cli-truncate": "6.1.1",
|
|
36
|
+
"commander": "15.0.0",
|
|
37
|
+
"libtmux": "0.1.0-alpha.11",
|
|
38
|
+
"oxfmt": "0.68.0",
|
|
39
|
+
"string-width": "8.2.2",
|
|
40
|
+
"yaml": "2.9.0"
|
|
41
|
+
},
|
|
42
|
+
"peerDependencies": {
|
|
43
|
+
"libtmux": "0.1.0-alpha.11"
|
|
44
|
+
},
|
|
45
|
+
"engines": {
|
|
46
|
+
"bun": ">=1.3.14",
|
|
47
|
+
"node": ">=22.12.0"
|
|
48
|
+
}
|
|
49
|
+
}
|