cvd: Better help for load and start subcommands#2605
Open
jemoreira wants to merge 7 commits into
Open
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added a default implementation of DetailedHelp that prints in the same format for all commands (unless they override it, which most still do):
Both
loadandstartmake use of that default implementation.Added more information and missing flags to both command's help output.
Some QoL improvements to the load command.