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

tubectl with completion? #10

Open
ghost opened this issue Nov 21, 2019 · 3 comments
Open

tubectl with completion? #10

ghost opened this issue Nov 21, 2019 · 3 comments

Comments

@ghost
Copy link

ghost commented Nov 21, 2019

One can use kubectl completion bash to have kubectl do auto completion. Can this be done with tubectl as well? I tried to do source <(tubectl completion bash) but it doesn't work. Maybe this can be supported?

Thanks,

@kovetskiy
Copy link
Member

Hi, I think you can just source original completion and then define compdef like as following:

source <(tubectl completion bash)
compdef tubectl=kubectl

Although, I'd recommend using workflow with aliases instead of tab-tab-completion, for example:

alias kp='tubectl get pods'

and then just go like that for listing pods in dev cluster in kube-system namespace

kp @dev +sys

@ghost
Copy link
Author

ghost commented Nov 25, 2019

Hi,

I tried your suggestion but it's not working. I know the alias option but that's not what I'm looking for.

The reason is with kubectl completion I can do kubectl get pod [TAB] and it'll show all the pods and I can tab to the one I want and continue without having to use the mouse to select the pod name and paste.

I really like tubectl that's why I'm asking for this feature. It does slow down productivity quite a bit when having to use the mouse.

Thanks,

@kovetskiy
Copy link
Member

Unfortunately, there is no improved completion right now.
But I know that feeling when you need to use your mouse to enter a name of pod, you can try to use tmux-autocomplete, it helps me in such cases: https://tmux.reconquest.io/ (I'm co-maintainer of it, licenses are free)

You're right, completion should be provided out of the box.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant