Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable search in kubectl help #25234

Closed
janetkuo opened this issue May 5, 2016 · 8 comments · Fixed by #27049
Closed

Enable search in kubectl help #25234

janetkuo opened this issue May 5, 2016 · 8 comments · Fixed by #27049
Labels
area/kubectl priority/backlog Higher priority than priority/awaiting-more-evidence.

Comments

@janetkuo
Copy link
Member

janetkuo commented May 5, 2016

It'd be similar to Linux apropos command, a command to search the man page files

@kubernetes/kubectl

@smarterclayton
Copy link
Contributor

Why not just make kubectl help do a search if it doesn't have an exact match?

@smarterclayton
Copy link
Contributor

kubectl help something
error: 'something' not found, did you mean:

get - a command to get values
describe - a command to show values

@adohe-zz
Copy link

adohe-zz commented May 5, 2016

sounds good.

@bgrant0607
Copy link
Member

SGTM

@bgrant0607 bgrant0607 added the priority/backlog Higher priority than priority/awaiting-more-evidence. label May 6, 2016
@janetkuo janetkuo changed the title Add a kubectl apropos command to search in kubectl help Enable search in kubectl help May 6, 2016
@sylwekb
Copy link
Contributor

sylwekb commented May 23, 2016

spf13/cobra#15 - Can be useful in this issue

@pigmej
Copy link
Contributor

pigmej commented May 23, 2016

I will work on this issue, if nobody is already working on it ( @Gitfred is not working on it).

@janetkuo
Copy link
Member Author

janetkuo commented Jun 1, 2016

@pigmej thanks!

@pigmej
Copy link
Contributor

pigmej commented Jun 3, 2016

@janetkuo I focused currently on a bit different stuff, sorry. So I will start/finish it later. If anyone want to take over this one, feel free for now.

k8s-github-robot pushed a commit that referenced this issue Jun 30, 2016
Automatic merge from submit-queue

Implement custom help command for kubectl

```release-note
* kubectl help now provides "Did you mean this?" suggestions for typo/invalid command names.
```

Custom implementation of help command allows to print `Did you mean this?` with
suggestions, which is missed in embed help command from github.com/spf13/cobra

Also, it can be extended with different search features. At this patch, help
command searches query in short descriptions of commands in case of mismatch
with commands names.

fixes #25234
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/kubectl priority/backlog Higher priority than priority/awaiting-more-evidence.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants