Skip to content
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

kubernetes: remove backquotes from flag descriptions #1510

Conversation

bhcleek
Copy link
Contributor

@bhcleek bhcleek commented Mar 6, 2024

Remove backquotes from flag descriptions in the kubernetes subcommands, because those backquotes cause pflag's usage parser to extract them and treat them as a flag name to try to determine the data type of the flag. The practical effect of this was that the help was borderline unreadable because the description was forced so far right and narrow.

Remove backquotes from flag descriptions in the kubernetes subcommands,
because those backquotes cause pflag's usage parser to extract them and
treat them as a flag name to try to determine the data type of the flag.
The practical effect of this was that the help was borderline unreadable
because the description was forced so far right and narrow.
@andrewsomething
Copy link
Member

Requested a review from @dbrian57 for impact on pdocs.

@andrewsomething
Copy link
Member

This does improve on the existing experience on the CLI. Top pane is the most recent release and the bottom one is built from this PR:

image

@@ -264,46 +264,46 @@ Retrieves a list of slugs representing Kubernetes upgrade versions you can use t

cmdKubeClusterCreate := CmdBuilder(cmd, k8sCmdService.RunKubernetesClusterCreate(defaultKubernetesNodeSize,
defaultKubernetesNodeCount), "create <name>", "Create a Kubernetes cluster", `
Creates a Kubernetes cluster given the specified options and using the specified name. Before creating the cluster, you can use `+"`"+`doctl kubernetes options`+"`"+` to see possible values for the various configuration flags.
Creates a Kubernetes cluster given the specified options and using the specified name. Before creating the cluster, you can use doctl kubernetes options to see possible values for the various configuration flags.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we use regular quotes instead of backtick quotes to retain the command delimiters?

@bhcleek
Copy link
Contributor Author

bhcleek commented Mar 8, 2024

@timoreimann I refactored and put up #1511 as an alternative PR that I think is a better change, because it provides an even more useful usage message without dropping the backquotes around some commands.

@andrewsomething
Copy link
Member

Closing as this was superseded by #1511

@bhcleek bhcleek deleted the kubernetes-backquote-usage-extraction branch March 8, 2024 21:42
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.

3 participants