kubernetes/hack
Kubernetes Submit Queue c19569f03f Merge pull request #34502 from fabianofranz/cli_usability_improvements
Automatic merge from submit-queue

Improvements to CLI usability and maintainability

Improves `kubectl` from an usability perspective by

1. Fixing how we handle terminal width in help. Some sections like the flags use the entire available width, while others like long descriptions breaks lines but don't follow a well established max width (screenshot below). This PR adds a new responsive writer that will adjust to terminal width and set 80, 100, or 120 columns as the max width, but not more than that given POSIX best practices and recommendations for better readability.
![terminal_width](https://cloud.githubusercontent.com/assets/158611/19253184/b23a983e-8f1f-11e6-9bae-667dd5981485.png)
2. Adds our own normalizers for long descriptions and cmd examples which allows us better control about how things like lists, paragraphs, line breaks, etc are printed. Features markdown support. Looks like `templates.LongDesc` and `templates.Examples` instead of `dedent.Dedend`.
3. Allows simple reordering and reuse of help and usage sections.
3. Adds `verify-cli-conventions.sh` which intends to run tests to make sure cmd developers are using what we propose as [kubectl conventions](https://github.com/kubernetes/kubernetes/blob/master/docs/devel/kubectl-conventions.md). Just a couple simple tests for now but the framework is there and it's easy to extend.
4. Update [kubectl conventions](https://github.com/kubernetes/kubernetes/blob/master/docs/devel/kubectl-conventions.md) to use our own normalizers instead of `dedent.Dedent`.

**Release note**:
<!--  Steps to write your release note:
1. Use the release-note-* labels to set the release note state (if you have access) 
2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`. 
-->
```release-note
Improves how 'kubectl' uses the terminal size when printing help and usage.
```

@kubernetes/kubectl
2016-10-17 23:41:23 -07:00
..
boilerplate Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
cmd/teststale Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
e2e-internal [Federation] Sleep for 2m (arbitrarily chosen) to let the underlying clusters to clean up all the resources they are holding. 2016-09-29 13:46:36 -07:00
gen-swagger-doc change the relative links to definition in operations.html to satisfy the new path set in the kubernetes.io 2016-07-29 13:29:34 -07:00
jenkins Increase job cache limit to 300 and leave a TODO. 2016-10-13 12:09:06 -07:00
lib Merge pull request #34150 from mbohlool/co2 2016-10-06 08:44:59 -07:00
make-rules Merge pull request #34836 from mikedanese/prune-1 2016-10-15 18:38:20 -07:00
testdata kubectl: apply prune should fallback to basic delete when a resource has no reaper 2016-10-14 15:04:38 -07:00
verify-flags Merge pull request #34719 from errordeveloper/api-and-disco-ports 2016-10-17 05:54:38 -07:00
.linted_packages Merge pull request #34502 from fabianofranz/cli_usability_improvements 2016-10-17 23:41:23 -07:00
autogenerated_placeholder.txt Revamp doc generation 2016-06-08 17:22:12 -07:00
benchmark-go.sh Use make as the main build tool 2016-07-12 21:52:00 -07:00
benchmark-integration.sh Use make as the main build tool 2016-07-12 21:52:00 -07:00
build-cross.sh Make releases work 2016-07-12 21:52:54 -07:00
build-go.sh Use make as the main build tool 2016-07-12 21:52:00 -07:00
build-ui.sh Cleanup non-rest apiserver handlers 2016-09-15 13:22:45 +02:00
cherry_pick_pull.sh hack: update cherry-pick script to show subject when patch is split 2016-10-06 11:50:39 -07:00
dev-build-and-push.sh Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
dev-build-and-up.sh Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
dev-push-hyperkube.sh hack: fix dev-push-hyperkube.sh 2016-10-09 07:19:30 -07:00
e2e-node-test.sh Use make as the main build tool 2016-07-12 21:52:00 -07:00
e2e.go Merge pull request #34128 from spxtr/nodeinfo 2016-10-13 05:37:02 -07:00
federated-ginkgo-e2e.sh Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
generate-docs.sh Use make as the main build tool 2016-07-12 21:52:00 -07:00
get-build.sh Merge pull request #26755 from david-mcmahon/fix-headers 2016-06-29 18:46:07 -07:00
ginkgo-e2e.sh Get network name via e2e environment. 2016-08-26 13:31:08 -07:00
godep-save.sh Make script more friendly 2016-09-22 13:41:27 -07:00
grab-profiles.sh Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
install-etcd.sh Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
list-feature-tests.sh Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
local-up-cluster.sh local-up: Add option to guess binary path 2016-10-17 11:55:29 -07:00
lookup_pull.py Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
OWNERS Add jbeda to OWNERS for build, cluster, hack 2016-09-27 14:53:16 -07:00
run-in-gopath.sh Allow make to run from outside GOPATH 2016-07-15 08:42:12 -07:00
test-cmd.sh fix hack/test-cmd 2016-08-02 10:27:29 -04:00
test-go.sh Use make as the main build tool 2016-07-12 21:52:00 -07:00
test-integration.sh choose a particular directory test-integration 2016-08-26 12:33:06 -04:00
test-update-storage-objects.sh Support upgrade/downgrade in etcd image. 2016-10-10 08:40:59 +02:00
update-all.sh hack: run openapi-spec as part of update-all.sh 2016-10-04 16:43:44 +02:00
update-api-reference-docs.sh update generation scripts to share API group version constants 2016-09-22 13:30:41 -04:00
update-bindata.sh add hint message for bindata 2016-10-08 16:41:57 +08:00
update-codecgen.sh added copy.sh which cuts the client repo; made necessary changes to scripts in 2016-08-09 14:07:53 -07:00
update-codegen.sh Daemonset in federated clientset 2016-10-05 19:58:49 +02:00
update-federation-api-reference-docs.sh Adding a script to update federation API reference docs 2016-08-31 13:21:42 -07:00
update-federation-generated-swagger-docs.sh Adding a script to update federation API reference docs 2016-08-31 13:21:42 -07:00
update-federation-openapi-spec.sh Add script to generate and store federation openapi spec in source tree 2016-10-06 13:10:01 -07:00
update-federation-swagger-spec.sh Adding update-federation-generated-swagger-docs to generate comment funcs for federation gvs 2016-08-30 14:15:21 -07:00
update-generated-docs.sh Use make as the main build tool 2016-07-12 21:52:00 -07:00
update-generated-protobuf-dockerized.sh add UpdateRuntimeConfig interface 2016-10-12 22:33:58 -07:00
update-generated-protobuf.sh Make update-generated-*.sh not hack around with docker images 2016-10-03 19:42:21 -07:00
update-generated-runtime-dockerized.sh Make update-generated-runtime work 2016-07-12 21:52:54 -07:00
update-generated-runtime.sh Make update-generated-*.sh not hack around with docker images 2016-10-03 19:42:21 -07:00
update-generated-swagger-docs.sh update generation scripts to share API group version constants 2016-09-22 13:30:41 -04:00
update-godep-licenses.sh Add a bash version check and some suggested updates for OSX. 2016-09-29 13:38:22 -07:00
update-gofmt.sh Merge pull request #31547 from mbohlool/fix2 2016-09-14 05:35:51 -07:00
update-munge-docs.sh Use make as the main build tool 2016-07-12 21:52:00 -07:00
update-openapi-spec.sh Generate and verify openapi specs in source tree at api/openapi-spec 2016-09-29 17:03:31 -07:00
update-swagger-spec.sh update generation scripts to share API group version constants 2016-09-22 13:30:41 -04:00
update_owners.py Don't assign anything to Sami anymore 2016-09-01 22:52:13 -07:00
verify-all.sh Use make as the main build tool 2016-07-12 21:52:00 -07:00
verify-api-reference-docs.sh Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
verify-boilerplate.sh Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
verify-cli-conventions.sh Tools for checking CLI conventions 2016-10-17 11:50:02 -02:00
verify-codecgen.sh Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
verify-codegen.sh Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
verify-description.sh Use make as the main build tool 2016-07-12 21:52:00 -07:00
verify-flags-underscore.py ignore staging in munge scripts 2016-08-24 13:09:13 -07:00
verify-generated-docs.sh Use make as the main build tool 2016-07-12 21:52:00 -07:00
verify-generated-protobuf.sh Increase build verbosity for rsync operations in verify-generated-{protobuf,runtime}.sh 2016-10-13 13:40:07 -07:00
verify-generated-runtime.sh Increase build verbosity for rsync operations in verify-generated-{protobuf,runtime}.sh 2016-10-13 13:40:07 -07:00
verify-generated-swagger-docs.sh Use rsync to get source into build container 2016-10-03 19:42:20 -07:00
verify-godep-licenses.sh Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
verify-godeps.sh make verify godeps help you fix your problems 2016-09-21 18:08:41 -07:00
verify-gofmt.sh ignore staging in munge scripts 2016-08-24 13:09:13 -07:00
verify-golint.sh fix hack/verify-golint.sh to work outside of GOPATH 2016-09-08 11:07:49 -04:00
verify-govet.sh Use make as the main build tool 2016-07-12 21:52:00 -07:00
verify-import-boss.sh Use make as the main build tool 2016-07-12 21:52:00 -07:00
verify-linkcheck.sh Use make as the main build tool 2016-07-12 21:52:00 -07:00
verify-munge-docs.sh Add missing mungedoc run to hack/verify-munge-docs.sh. 2016-07-13 13:39:20 -07:00
verify-openapi-spec.sh Generate and verify openapi specs in source tree at api/openapi-spec 2016-09-29 17:03:31 -07:00
verify-swagger-spec.sh Use make as the main build tool 2016-07-12 21:52:00 -07:00
verify-symbols.sh Use make as the main build tool 2016-07-12 21:52:00 -07:00
verify-test-images.sh Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00