Bug 1263948 - [origin_userinterface_542]It's better to give whole related command or more accurate command for suggestion
[origin_userinterface_542]It's better to give whole related command or more ...
Product: OpenShift Origin
Classification: Red Hat
Component: Command Line Interface (Show other bugs)
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Fabiano Franz
Wei Sun
Depends On:
  Show dependency treegraph
Reported: 2015-09-17 03:18 EDT by Wei Sun
Modified: 2015-11-23 16:14 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2015-11-23 16:14:46 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Wei Sun 2015-09-17 03:18:02 EDT
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

How reproducible:

Steps to Reproduce:
1.$ oc ty -h
Error: unknown command "ty" for "oc"

Did you mean this?

Run 'oc --help' for usage.

2.$ oc t -h
Error: unknown command "t" for "oc"

Did you mean this?

Run 'oc --help' for usage.

3.$ oc new -h
Error: unknown command "new" for "oc"

Did you mean this?

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:
Comment 1 Fabiano Franz 2015-09-28 11:07:08 EDT
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.

Comment 2 Fabiano Franz 2015-09-29 20:33:10 EDT
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").
Comment 3 weiwei jiang 2015-09-30 05:01:38 EDT
Checked with devenv-fedora_2430, and the issue has been fixed.

Note You need to log in before you can comment on or make changes to this bug.