Skip to content

Commit 3bad410

Browse files
adrienthebocsweichel
authored andcommitted
[cmd] add completions for collect, validate collect args
1 parent c7c8c5d commit 3bad410

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

cmd/collect.go

+4-3
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,10 @@ type variantDescription struct {
2929

3030
// collectCmd represents the collect command
3131
var collectCmd = &cobra.Command{
32-
Use: "collect [components|packages|scripts|files]",
33-
Short: "Collects all packages in a workspace",
34-
Args: cobra.MaximumNArgs(1),
32+
Use: "collect [components|packages|scripts|files]",
33+
Short: "Collects all packages in a workspace",
34+
Args: cobra.MatchAll(cobra.OnlyValidArgs, cobra.MaximumNArgs(1)),
35+
ValidArgs: []string{"components", "packages", "scripts", "scripts", "files"},
3536
Run: func(cmd *cobra.Command, args []string) {
3637
workspace, err := getWorkspace()
3738
if err != nil {

0 commit comments

Comments
 (0)