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

[Proposal] Add new API to pass options to complete command #101

Open
vadmeste opened this issue Oct 11, 2019 · 5 comments
Open

[Proposal] Add new API to pass options to complete command #101

vadmeste opened this issue Oct 11, 2019 · 5 comments

Comments

@vadmeste
Copy link
Contributor

Hey.

Currently, using posener/complete does not automatically escape spaces in bash.

I think the best solution of this is to add a new API which pass options to complete command, such as:

What do you think @posener ?

@posener
Copy link
Owner

posener commented Oct 13, 2019 via email

@posener
Copy link
Owner

posener commented Oct 23, 2019

Hey

If one would want to add these options, they would be added to the bash complete command here: https://github.com/posener/complete/blob/master/cmd/install/bash.go#L36.

Would you be interested in contributing this options?

@vadmeste
Copy link
Contributor Author

Would you be interested in contributing this options?

Yes, I am interested.

  • I am not sure if you can add them to other supported shells (fish, zsh).

I think the best thing to do is to add an API which adds more flags and arguments to the completion command. fish complete command is different to bash & zsh

@AdamSLevy
Copy link
Contributor

I looked into this some time ago and found that it is not possible to call bash's builtins from an external program. So unless the fundamental mechanism that this completion library operates on is changed, this will not be possible IIRC.

See https://stackoverflow.com/questions/55842705/is-it-possible-to-modify-compopts-dynamically-from-an-external-completion-comman

@vadmeste
Copy link
Contributor Author

I looked into this some time ago and found that it is not possible to call bash's builtins from an external program. So unless the fundamental mechanism that this completion library operates on is changed, this will not be possible IIRC.

See https://stackoverflow.com/questions/55842705/is-it-possible-to-modify-compopts-dynamically-from-an-external-completion-comman

Indeed. This is not a dynamic thing. It will be configured during the setup of the completion

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

No branches or pull requests

3 participants