-
Notifications
You must be signed in to change notification settings - Fork 49
Add autocomplete for bash and zsh in lokoctl #880
Conversation
b51fea4
to
b661405
Compare
b661405
to
b22d04a
Compare
@invidian, so I think, we should currently go for this until cobra releases it's new updates. Do you agree? |
For 0.4 we can release it with this, if by 0.5 cobra releases their new updates, we can change it to |
Or we could do bash completion for 0.4 and zsh completion for the next release? What do you think @johananl? Or we could postpone this completely. |
As mentioned in #880 (comment) we don't know when the next cobra release will be, but if we do want to use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some nits, otherwise LGTM 👍
b22d04a
to
af14a88
Compare
b4c5ebf
to
b016146
Compare
b016146
to
cdabe7f
Compare
cdabe7f
to
638a75f
Compare
@johananl could you please review again? |
1b81139
to
dba8989
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @knrt10.
I'm still seeing small inconsistencies. I've highlighted some of them inline. We also seem to be using multiple variations of "completion/autocompletion" and "script/code". Let's settle on one phrasing 😉
cli/cmd/completion.go
Outdated
# Set the lokoctl completion code for zsh to autoload on startup. | ||
lokoctl completion zsh > "${fpath[1]}/_lokoctl" && exec $SHELL` | ||
|
||
const bashCompDesc = ` ### If running Bash 3.2 that is included with macOS, install bash completion using homebrew. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why use ###
? Is this some sort of convention?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For docs, otherwise, they look wierd, because single # is considered as Header 1
dba8989
to
bb17567
Compare
Updated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one nit, otherwise looks fine to me.
bb17567
to
d6c0a8c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some small comments.
Fixes #18 Signed-off-by: knrt10 <kautilya@kinvolk.io>
d6c0a8c
to
9b69228
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
tested for both zsh and bash. Merging now. Thanks, everyone for the review |
Fixes #18
Signed-off-by: knrt10 kautilya@kinvolk.io