Skip to content

Commit 2ec3e64

Browse files
committed
changed man pages and bash completions
1 parent 09b52bf commit 2ec3e64

13 files changed

+271
-57
lines changed

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@ debug
22
arduino
33
arduino-cli
44
main
5-
.vscode/settings.json
6-
docs/manpages
5+
.vscode/settings.json

docs/bash_completions/arduino

Lines changed: 65 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -227,39 +227,63 @@ __handle_word()
227227
}
228228

229229

230-
__arduino_autocomplete()
230+
__arduino_autocomplete()
231+
{
232+
case $(last_command) in
233+
arduino)
234+
opts="lib core help version"
235+
;;
236+
arduino_lib)
237+
opts="install uninstall list search version --update-index"
238+
;;
239+
arduino_core)
240+
opts="install uninstall list search version --update-index"
241+
;;
242+
arduino_help)
243+
opts="lib core version"
244+
;;
245+
esac
246+
if [[ ${cur} == " *" ]] ; then
247+
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
248+
return 0
249+
fi
250+
return 1
251+
}
252+
_arduino_core_list()
231253
{
232-
case $(last_command) in
233-
arduino_lib)
234-
opts="install uninstall list search version"
235-
;;
236-
arduino_lib_list)
237-
opts="update"
238-
;;
239-
arduino_help)
240-
opts="lib core version"
241-
;;
242-
arduino)
243-
opts="lib help version"
244-
;;
245-
esac
246-
if [[ ${cur} == " *" ]] ; then
247-
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
248-
return 0
249-
fi
250-
return 1
254+
last_command="arduino_core_list"
255+
commands=()
256+
257+
flags=()
258+
two_word_flags=()
259+
local_nonpersistent_flags=()
260+
flags_with_completion=()
261+
flags_completion=()
262+
263+
flags+=("--format=")
264+
flags+=("--verbose")
265+
flags+=("-v")
266+
267+
must_have_one_flag=()
268+
must_have_one_noun=()
269+
noun_aliases=()
251270
}
252-
_arduino_config()
271+
272+
_arduino_core()
253273
{
254-
last_command="arduino_config"
274+
last_command="arduino_core"
255275
commands=()
276+
commands+=("list")
256277

257278
flags=()
258279
two_word_flags=()
259280
local_nonpersistent_flags=()
260281
flags_with_completion=()
261282
flags_completion=()
262283

284+
flags+=("--update-index")
285+
local_nonpersistent_flags+=("--update-index")
286+
flags+=("--format=")
263287
flags+=("--verbose")
264288
flags+=("-v")
265289

@@ -268,9 +292,9 @@ _arduino_config()
268292
noun_aliases=()
269293
}
270294

271-
_arduino_lib_install()
295+
_arduino_lib_download()
272296
{
273-
last_command="arduino_lib_install"
297+
last_command="arduino_lib_download"
274298
commands=()
275299

276300
flags=()
@@ -279,6 +303,7 @@ _arduino_lib_install()
279303
flags_with_completion=()
280304
flags_completion=()
281305

306+
flags+=("--format=")
282307
flags+=("--verbose")
283308
flags+=("-v")
284309

@@ -287,9 +312,9 @@ _arduino_lib_install()
287312
noun_aliases=()
288313
}
289314

290-
_arduino_lib_list_update()
315+
_arduino_lib_install()
291316
{
292-
last_command="arduino_lib_list_update"
317+
last_command="arduino_lib_install"
293318
commands=()
294319

295320
flags=()
@@ -298,6 +323,7 @@ _arduino_lib_list_update()
298323
flags_with_completion=()
299324
flags_completion=()
300325

326+
flags+=("--format=")
301327
flags+=("--verbose")
302328
flags+=("-v")
303329

@@ -310,14 +336,14 @@ _arduino_lib_list()
310336
{
311337
last_command="arduino_lib_list"
312338
commands=()
313-
commands+=("update")
314339

315340
flags=()
316341
two_word_flags=()
317342
local_nonpersistent_flags=()
318343
flags_with_completion=()
319344
flags_completion=()
320345

346+
flags+=("--format=")
321347
flags+=("--verbose")
322348
flags+=("-v")
323349

@@ -337,6 +363,7 @@ _arduino_lib_search()
337363
flags_with_completion=()
338364
flags_completion=()
339365

366+
flags+=("--format=")
340367
flags+=("--verbose")
341368
flags+=("-v")
342369

@@ -356,6 +383,7 @@ _arduino_lib_uninstall()
356383
flags_with_completion=()
357384
flags_completion=()
358385

386+
flags+=("--format=")
359387
flags+=("--verbose")
360388
flags+=("-v")
361389

@@ -375,6 +403,7 @@ _arduino_lib_version()
375403
flags_with_completion=()
376404
flags_completion=()
377405

406+
flags+=("--format=")
378407
flags+=("--verbose")
379408
flags+=("-v")
380409

@@ -387,6 +416,7 @@ _arduino_lib()
387416
{
388417
last_command="arduino_lib"
389418
commands=()
419+
commands+=("download")
390420
commands+=("install")
391421
commands+=("list")
392422
commands+=("search")
@@ -399,6 +429,9 @@ _arduino_lib()
399429
flags_with_completion=()
400430
flags_completion=()
401431

432+
flags+=("--update-index")
433+
local_nonpersistent_flags+=("--update-index")
434+
flags+=("--format=")
402435
flags+=("--verbose")
403436
flags+=("-v")
404437

@@ -418,6 +451,7 @@ _arduino_version()
418451
flags_with_completion=()
419452
flags_completion=()
420453

454+
flags+=("--format=")
421455
flags+=("--verbose")
422456
flags+=("-v")
423457

@@ -430,7 +464,7 @@ _arduino()
430464
{
431465
last_command="arduino"
432466
commands=()
433-
commands+=("config")
467+
commands+=("core")
434468
commands+=("lib")
435469
commands+=("version")
436470

@@ -442,6 +476,9 @@ _arduino()
442476

443477
flags+=("--config=")
444478
local_nonpersistent_flags+=("--config=")
479+
flags+=("--format=")
480+
flags+=("--generate-docs")
481+
local_nonpersistent_flags+=("--generate-docs")
445482
flags+=("--help")
446483
flags+=("-h")
447484
local_nonpersistent_flags+=("--help")

docs/manpages/arduino-core-list.1

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
.TH "ARDUINO COMMAND LINE MANUAL" "1" "Jul 2017" "Auto generated by spf13/cobra" ""
2+
.nh
3+
.ad l
4+
5+
6+
.SH NAME
7+
.PP
8+
arduino\-core\-list \- Shows the list of installed cores
9+
10+
11+
.SH SYNOPSIS
12+
.PP
13+
\fBarduino core list [flags]\fP
14+
15+
16+
.SH DESCRIPTION
17+
.PP
18+
Shows the list of installed cores.
19+
With \-v tag (up to 2 times) can provide more verbose output.
20+
21+
22+
.SH OPTIONS
23+
.PP
24+
\fB\-h\fP, \fB\-\-help\fP[=false]
25+
help for list
26+
27+
28+
.SH OPTIONS INHERITED FROM PARENT COMMANDS
29+
.PP
30+
\fB\-\-format\fP="invalid"
31+
the output format, can be [text|json]
32+
33+
.PP
34+
\fB\-v\fP, \fB\-\-verbose\fP[=0]
35+
enables verbose output (use more times for a higher level)
36+
37+
38+
.SH SEE ALSO
39+
.PP
40+
\fBarduino\-core(1)\fP
41+
42+
43+
.SH HISTORY
44+
.PP
45+
27\-Jul\-2017 Auto generated by spf13/cobra

docs/manpages/arduino-core.1

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
.TH "ARDUINO COMMAND LINE MANUAL" "1" "Jul 2017" "Auto generated by spf13/cobra" ""
2+
.nh
3+
.ad l
4+
5+
6+
.SH NAME
7+
.PP
8+
arduino\-core \- Arduino Core operations
9+
10+
11+
.SH SYNOPSIS
12+
.PP
13+
\fBarduino core [flags]\fP
14+
15+
16+
.SH DESCRIPTION
17+
.PP
18+
Arduino Core operations
19+
20+
21+
.SH OPTIONS
22+
.PP
23+
\fB\-h\fP, \fB\-\-help\fP[=false]
24+
help for core
25+
26+
.PP
27+
\fB\-\-update\-index\fP[=false]
28+
Updates the index of cores to the latest version
29+
30+
31+
.SH OPTIONS INHERITED FROM PARENT COMMANDS
32+
.PP
33+
\fB\-\-format\fP="invalid"
34+
the output format, can be [text|json]
35+
36+
.PP
37+
\fB\-v\fP, \fB\-\-verbose\fP[=0]
38+
enables verbose output (use more times for a higher level)
39+
40+
41+
.SH SEE ALSO
42+
.PP
43+
\fBarduino(1)\fP, \fBarduino\-core\-list(1)\fP
44+
45+
46+
.SH HISTORY
47+
.PP
48+
27\-Jul\-2017 Auto generated by spf13/cobra

docs/manpages/arduino-lib-download.1

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
.TH "ARDUINO COMMAND LINE MANUAL" "1" "Jul 2017" "Auto generated by spf13/cobra" ""
2+
.nh
3+
.ad l
4+
5+
6+
.SH NAME
7+
.PP
8+
arduino\-lib\-download \- Downloads one or more libraries without installing them
9+
10+
11+
.SH SYNOPSIS
12+
.PP
13+
\fBarduino lib download [LIBRARY\_NAME(S)] [flags]\fP
14+
15+
16+
.SH DESCRIPTION
17+
.PP
18+
Downloads one or more libraries without installing them
19+
20+
21+
.SH OPTIONS
22+
.PP
23+
\fB\-h\fP, \fB\-\-help\fP[=false]
24+
help for download
25+
26+
27+
.SH OPTIONS INHERITED FROM PARENT COMMANDS
28+
.PP
29+
\fB\-\-format\fP="invalid"
30+
the output format, can be [text|json]
31+
32+
.PP
33+
\fB\-v\fP, \fB\-\-verbose\fP[=0]
34+
enables verbose output (use more times for a higher level)
35+
36+
37+
.SH SEE ALSO
38+
.PP
39+
\fBarduino\-lib(1)\fP
40+
41+
42+
.SH HISTORY
43+
.PP
44+
27\-Jul\-2017 Auto generated by spf13/cobra

docs/manpages/arduino-lib-install.1

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH "ARDUINO COMMAND LINE MANUAL" "1" "Jun 2017" "BCMI LABS SA" ""
1+
.TH "ARDUINO COMMAND LINE MANUAL" "1" "Jul 2017" "Auto generated by spf13/cobra" ""
22
.nh
33
.ad l
44

@@ -10,7 +10,8 @@ arduino\-lib\-install \- Installs one of more specified libraries into the syste
1010

1111
.SH SYNOPSIS
1212
.PP
13-
\fBarduino lib install [flags]\fP
13+
\fBarduino lib install LIBRARY@VERSION\_NUMBER
14+
\[la]S\[ra] [flags]\fP
1415

1516

1617
.SH DESCRIPTION
@@ -25,6 +26,10 @@ Installs one or more specified libraries into the system.
2526

2627

2728
.SH OPTIONS INHERITED FROM PARENT COMMANDS
29+
.PP
30+
\fB\-\-format\fP="invalid"
31+
the output format, can be [text|json]
32+
2833
.PP
2934
\fB\-v\fP, \fB\-\-verbose\fP[=0]
3035
enables verbose output (use more times for a higher level)
@@ -37,4 +42,4 @@ Installs one or more specified libraries into the system.
3742

3843
.SH HISTORY
3944
.PP
40-
14\-Jun\-2017 BCMI LABS SA
45+
27\-Jul\-2017 Auto generated by spf13/cobra

0 commit comments

Comments
 (0)