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

Load single completion script #9

Open
kriomant opened this issue Oct 17, 2023 · 2 comments
Open

Load single completion script #9

kriomant opened this issue Oct 17, 2023 · 2 comments

Comments

@kriomant
Copy link

Can I use it to load single completion file manually, like e.g. load_bash_completion bla.bash.inc?

@3v1n0
Copy link
Owner

3v1n0 commented Oct 17, 2023

In theory setting ZSH_BASH_COMPLETIONS_FALLBACK_LOAD_NATIVE_COMPLETIONS=false.

Then use compdef _bash_completions_fallback_completer $completion (replacing completion with the proper completion function), however it's indeed something that should be improved.

You can also use it together with ZSH_BASH_COMPLETIONS_FALLBACK_WHITELIST to set to an array of completions you want to load automatically.

@kriomant
Copy link
Author

If I understand correctly, you should first load autocompletion script, then pass function to _bash_completions_fallback_completer. The problem is that completion script itself cannot be loaded — it uses bash-specific commands inside (on the top level, outside of any function).

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

2 participants