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

Leverage existing bash completion #4020

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Conversation

junegunn
Copy link
Owner

This is a PoC implementation for leveraging existing bash completion

Example: kubectl

image

However, when we select a command, fzf pastes the whole line to the command, which is definitely not what we want.

image

Example: git

image

This is a PoC implementation for leveraging existing bash completion

git **<tab>
kubectl **<tab>
@lincheney
Copy link
Contributor

I think you're running into something related to this spf13/cobra#1508, spf13/cobra#1509
I believe kubectl uses cobra which is adding those extra descriptions.
If you set an appropriate $COMP_TYPE cobra will stop doing it, but you will lose the descriptions e.g. lincheney/fzf-tab-completion@d88bf5b
or something like what ble.sh does where they detect and specially handle cobra completions akinomyoga/ble.sh@71d0736

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

Successfully merging this pull request may close these issues.

2 participants