Skip to content

Commit 2b4c96b

Browse files
committed
make fqbn flag required, so that the completion suggests it when pressing <tab><tab>
for better explanation see https://github.com/spf13/cobra/blob/master/shell_completions.md#mark-flags-as-required
1 parent e66c320 commit 2b4c96b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Diff for: cli/compile/compile.go

+1
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ func NewCommand() *cobra.Command {
8383
}
8484

8585
command.Flags().StringVarP(&fqbn, "fqbn", "b", "", tr("Fully Qualified Board Name, e.g.: arduino:avr:uno"))
86+
command.MarkFlagRequired("fqbn")
8687
command.Flags().BoolVar(&showProperties, "show-properties", false, tr("Show all build properties used instead of compiling."))
8788
command.Flags().BoolVar(&preprocess, "preprocess", false, tr("Print preprocessed code to stdout instead of compiling."))
8889
command.Flags().StringVar(&buildCachePath, "build-cache-path", "", tr("Builds of 'core.a' are saved into this path to be cached and reused."))

0 commit comments

Comments
 (0)