Skip to content

cvd: Better help for load and start subcommands#2605

Open
jemoreira wants to merge 7 commits into
google:mainfrom
jemoreira:flags
Open

cvd: Better help for load and start subcommands#2605
jemoreira wants to merge 7 commits into
google:mainfrom
jemoreira:flags

Conversation

@jemoreira
Copy link
Copy Markdown
Member

Added a default implementation of DetailedHelp that prints in the same format for all commands (unless they override it, which most still do):

cvd `CmdList()[0]` - `SummaryHelp()`

`Description()`

`Flags()`

Both load and start make use of that default implementation.

Added more information and missing flags to both command's help output.

Some QoL improvements to the load command.

jemoreira added 7 commits May 22, 2026 17:41
New virtual functions for description and flags are added to the base
command handler class, with default implementation since not all
subcommands implement them yet.

The default implementation of DetailedHelp will ensure all help messages
will have the same style.
Not all command handlers will be able to use the default help
implementation. They can still reuse some of the lower level utitlities
by exposing those in a library.
By adding a marker to the string that the helper removes, but otherwise
leaves the input string unmodified.
Use the default DetailedHelp implmentation for consistent formatting.

Add more details to the help text.
The credential_source and project_id flags are parsed into respective
string fields, only to later add them to the overrides list. This change
makes the setter and getter of those flags interact with the overrides
list directly.

Assisted-by: Gemini:Next
Overriding the same property in the same instance is likely an error, so
it's best to fail than produce unexpected results for the user.
@jemoreira jemoreira requested a review from Databean May 23, 2026 00:48
@jemoreira jemoreira enabled auto-merge May 23, 2026 00:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant