Skip to content

Commit 739841c

Browse files
committed
add completion for lib deps
1 parent 98f0378 commit 739841c

File tree

3 files changed

+16
-12
lines changed

3 files changed

+16
-12
lines changed

cli/lib/check_deps.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import (
2020
"fmt"
2121
"os"
2222

23+
"github.com/arduino/arduino-cli/cli/arguments"
2324
"github.com/arduino/arduino-cli/cli/errorcodes"
2425
"github.com/arduino/arduino-cli/cli/feedback"
2526
"github.com/arduino/arduino-cli/cli/instance"
@@ -39,6 +40,9 @@ func initDepsCommand() *cobra.Command {
3940
" " + os.Args[0] + " lib deps AudioZero@1.0.0 # " + tr("for the specific version."),
4041
Args: cobra.ExactArgs(1),
4142
Run: runDepsCommand,
43+
ValidArgsFunction: func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
44+
return arguments.GetUninstallableLibs(toComplete), cobra.ShellCompDirectiveDefault
45+
},
4246
}
4347
return depsCommand
4448
}

i18n/data/en.po

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ msgstr "%[1]s %[2]s Version: %[3]s Commit: %[4]s Date: %[5]s"
99
msgid "%[1]s folder is no longer supported! See %[2]s for more information"
1010
msgstr "%[1]s folder is no longer supported! See %[2]s for more information"
1111

12-
#: cli/lib/check_deps.go:96
12+
#: cli/lib/check_deps.go:100
1313
msgid "%[1]s is required but %[2]s is currently installed."
1414
msgstr "%[1]s is required but %[2]s is currently installed."
1515

@@ -45,7 +45,7 @@ msgstr "%s downloaded"
4545
msgid "%s installed"
4646
msgstr "%s installed"
4747

48-
#: cli/lib/check_deps.go:93
48+
#: cli/lib/check_deps.go:97
4949
msgid "%s is already installed."
5050
msgstr "%s is already installed."
5151

@@ -57,7 +57,7 @@ msgstr "%s is not a directory"
5757
msgid "%s is not managed by package manager"
5858
msgstr "%s is not managed by package manager"
5959

60-
#: cli/lib/check_deps.go:90
60+
#: cli/lib/check_deps.go:94
6161
msgid "%s must be installed."
6262
msgstr "%s must be installed."
6363

@@ -185,7 +185,7 @@ msgstr "Arduino configuration commands."
185185
msgid "Arduino core operations."
186186
msgstr "Arduino core operations."
187187

188-
#: cli/lib/check_deps.go:50
188+
#: cli/lib/check_deps.go:54
189189
#: cli/lib/install.go:123
190190
msgid "Arguments error: %v"
191191
msgstr "Arguments error: %v"
@@ -340,8 +340,8 @@ msgstr "Cannot upgrade platform"
340340
msgid "Category: %s"
341341
msgstr "Category: %s"
342342

343-
#: cli/lib/check_deps.go:35
344343
#: cli/lib/check_deps.go:36
344+
#: cli/lib/check_deps.go:37
345345
msgid "Check dependencies status for the specified library."
346346
msgstr "Check dependencies status for the specified library."
347347

@@ -841,7 +841,7 @@ msgstr "Error reading sketch files"
841841
msgid "Error resolving FQBN: {0}"
842842
msgstr "Error resolving FQBN: {0}"
843843

844-
#: cli/lib/check_deps.go:60
844+
#: cli/lib/check_deps.go:64
845845
msgid "Error resolving dependencies for %[1]s: %[2]s"
846846
msgstr "Error resolving dependencies for %[1]s: %[2]s"
847847

@@ -1294,7 +1294,7 @@ msgstr "Just produce the compilation database, without actually compiling."
12941294
msgid "LIBNAME"
12951295
msgstr "LIBNAME"
12961296

1297-
#: cli/lib/check_deps.go:34
1297+
#: cli/lib/check_deps.go:35
12981298
#: cli/lib/install.go:40
12991299
msgid "LIBRARY"
13001300
msgstr "LIBRARY"
@@ -2284,7 +2284,7 @@ msgstr "Using previously compiled file: {0}"
22842284
msgid "VERSION"
22852285
msgstr "VERSION"
22862286

2287-
#: cli/lib/check_deps.go:34
2287+
#: cli/lib/check_deps.go:35
22882288
#: cli/lib/install.go:40
22892289
msgid "VERSION_NUMBER"
22902290
msgstr "VERSION_NUMBER"
@@ -2628,13 +2628,13 @@ msgstr "following possible symlink %[1]s: %[2]s"
26282628
msgid "for a specific version."
26292629
msgstr "for a specific version."
26302630

2631-
#: cli/lib/check_deps.go:38
2631+
#: cli/lib/check_deps.go:39
26322632
#: cli/lib/download.go:39
26332633
#: cli/lib/install.go:44
26342634
msgid "for the latest version."
26352635
msgstr "for the latest version."
26362636

2637-
#: cli/lib/check_deps.go:39
2637+
#: cli/lib/check_deps.go:40
26382638
#: cli/lib/install.go:45
26392639
msgid "for the specific version."
26402640
msgstr "for the specific version."

i18n/rice-box.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)