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

Improves cmd descriptions and how terminal size is handled on oc help #10993

Merged
  •  
  •  
  •  
4 changes: 4 additions & 0 deletions Godeps/Godeps.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ verify: build
hack/verify-generated-clientsets.sh
hack/verify-generated-completions.sh
hack/verify-generated-docs.sh
hack/verify-cli-conventions.sh
PROTO_OPTIONAL=1 hack/verify-generated-protobuf.sh
hack/verify-generated-swagger-descriptions.sh
hack/verify-generated-swagger-spec.sh
Expand Down
41 changes: 23 additions & 18 deletions docs/cli_hacking_guide.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,17 @@ type MineOptions struct {
mineLatest bool
}

const (
mineLong = `Some long description
for my command.`
var (
mineLong = templates.LongDesc(`
Some long description
for my command.`)

mineExample = ` # Run my command's first action
%[1]s first
mineExample = templates.Examples(`
# Run my command's first action
%[1]s first

# Run my command's second action on latest stuff
%[1]s second --latest`
# Run my command's second action on latest stuff
%[1]s second --latest`)
)

// NewCmdMine implement the OpenShift cli mine command.
Expand Down Expand Up @@ -136,11 +138,12 @@ Example:
====
[source,go,numbered,options="nowrap"]
----
deployExample = ` # Display the latest deployment for the 'database' deployment config
%[1]s database
deployExample = templates.Examples(`
# Display the latest deployment for the 'database' deployment config
%[1]s database

# Start a new deployment based on the 'database' deployment config
%[1]s database --latest`
# Start a new deployment based on the 'database' deployment config
%[1]s database --latest`)
----
====

Expand Down Expand Up @@ -237,17 +240,19 @@ type DeployOptions struct {
retryDeploy bool
}

const (
var (
// 2.
deployLong = `Some long description
for the deploy command.`
deployLong = templates.LongDesc(`
Some long description
for the deploy command.`)

// 3.
deployExample = ` # Display the latest deployment for the 'database' DeploymentConfig
%[1]s database
deployExample = templates.Examples(`
# Display the latest deployment for the 'database' DeploymentConfig
%[1]s database

# Start a new deployment based on the 'database' DeploymentConfig
%[1]s database --latest`
# Start a new deployment based on the 'database' DeploymentConfig
%[1]s database --latest`)
)

// 4.
Expand Down
Loading