Bug 1263948 - [origin_userinterface_542]It's better to give whole related command or more accurate command for suggestion
Summary: [origin_userinterface_542]It's better to give whole related command or more ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: oc
Version: 3.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Fabiano Franz
QA Contact: Wei Sun
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-09-17 07:18 UTC by Wei Sun
Modified: 2015-11-23 21:14 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-23 21:14:46 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Wei Sun 2015-09-17 07:18:02 UTC
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:

Comment 1 Fabiano Franz 2015-09-28 15:07:08 UTC
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

Comment 2 Fabiano Franz 2015-09-30 00:33:10 UTC
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 09:01:38 UTC
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.