* Add SilenceUsage option to cobra command
This patch adds `cmd.SilenceUsage` to command to stop usage output
after command validation.
Fixes https://github.com/knative/client/issues/38
* Set cmd.SilenceUsage to global cmd
* Support generating bash completion
This patch adds subcommand to generate completion script for bash.
As an knative user, we would like to complete subcommands and
options rather than typing them.
* Adds docs about bash auto completion in README.md
This changeset adds auto-completion section in existing README.md
Suggested-by: Navid Shaikh <nshaikh@redhat.com>
* put the auth libraries in the root command
* add revision describe (#15)
* print the yaml formatted revision by default
* allow for custom formatting to be passed in
* Refactor commands to allow insertion of fakes for testing
* Pin client-go to version that matches signatures other libs use
* Add tests for service list
* actually add test file
* Review comments: Fatal instead of Error/return, Split instead of read to newline
* Get revision and service listing skeletons in.
This adds the kn program, with basic commands for service and revision listing
in.
kn service list
kn revision list
They use the genericclioptions library from kubernetes to support jsonpath,
yaml, and json output. The default is to just list the names of the objects, for
now, until we add in some of the kubectl-based libraries for creating tables in
another commit.
This is deliberately bare-bones; I am looking to get the basic skeletons of how
this repository is laid out down.
No tests yet. Soon.
* Move commands to pkg, so cmd only contains minimalist main.go
* RunE instead of Run. The defaults on Cobra command generation are weird.
* Oops forgot to change types of stuff
* Do not panic on bad config file
* Make commands no longer global
* Make configuration initialization not static in the module, but rather triggered by main.go init