Description of problem: Input some characters in oc command,but only list some commands.It's better to give whole related command suggestion Version-Release number of selected component (if applicable): oc v1.0.6-62-gf74feb9 kubernetes v1.1.0-alpha.0-1605-g44c91b1 devenv_fedora_2355 How reproducible: Always Steps to Reproduce: 1.$ oc ty -h Error: unknown command "ty" for "oc" Did you mean this? tag Run 'oc --help' for usage. 2.$ oc t -h Error: unknown command "t" for "oc" Did you mean this? tag get Run 'oc --help' for usage. 3.$ oc new -h Error: unknown command "new" for "oc" Did you mean this? get Run 'oc --help' for usage. Actual results: Only list some commands Expected results: 1.It's better to list types command,since the typo includes "ty" 2.It's better to list all commands including "t" 3.It's better to list new-app and new-project Additional info:
There's a PR opened for Cobra, waiting for it to get merged so that we can bump it in OpenShift and get this fixed. https://github.com/spf13/cobra/pull/163
Fixed in https://github.com/openshift/origin/pull/4859 Added a prefix match (so that, for example, we suggest "new-app" and "new-project" when the user tries "oc new", or "types" when the user tries "oc ty" or "oc t").
Checked with devenv-fedora_2430, and the issue has been fixed.