8000 Explain usage of `monitor --config` in command help by per1234 · Pull Request #2249 · arduino/arduino-cli · GitHub
[go: up one dir, main page]

Skip to content

Explain usage of monitor --config in command help #2249

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
D3BD
Diff view
Explain usage of monitor --config in command help
The `--config` flag of the `arduino-cli monitor` command is used to configure the communication port used by the
monitor.

Previously the command line help did not provide any guidance for the usage of this flag, which might lead the users to
wonder:

- How can the configuration options available for use via the flag be determined?
- What is the format for the configuration option argument?

The information is provided in the FAQ page of the documentation, but that is not as convenient a source of information
as the command line help and the user may not even be aware of its existence.

The command help is hereby adjusted to provide the user with this information:

- Create a conceptual linkage between the `--config` and `--describe` flags by using the "communication port settings"
  terminology in the references of both.
- Document the argument format.

In addition to the comma-separated list format I documented here, an alternative usage of passing multiple `--config`
flags is also supported. I chose the former because I felt that the descriptions of the latter in either command line
notation (e.g., `[--config <ID>=<value>]...`) or in prose (e.g., "The format is <ID>=<value>. Can be used multiple times
for multiple settings.") were less clear.
  • Loading branch information
per1234 committed Jul 23, 2023
commit 3ea6895f0b4154c1b70c4309bc308455cd902c11
2 changes: 1 addition & 1 deletion internal/cli/monitor/monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func NewCommand() *cobra.Command {
}
portArgs.AddToCommand(monitorCommand)
monitorCommand.Flags().BoolVar(&describe, "describe", false, tr("Show all the settings of the communication port."))
monitorCommand.Flags().StringSliceVarP(&configs, "config", "c", []string{}, tr("Configuration of the port."))
monitorCommand.Flags().StringSliceVarP(&configs, "config", "c", []string{}, tr("Configure communication port settings. The format is <ID>=<value>[,<ID>=<value>]..."))
monitorCommand.Flags().BoolVarP(&quiet, "quiet", "q", false, tr("Run in silent mode, show only monitor input and output."))
fqbn.AddToCommand(monitorCommand)
monitorCommand.MarkFlagRequired("port")
Expand Down
0