zsh-bash-completions-fallback icon indicating copy to clipboard operation
zsh-bash-completions-fallback copied to clipboard

Load single completion script

Open kriomant opened this issue 2 years ago • 2 comments

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

kriomant avatar Oct 17 '23 17:10 kriomant

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.

3v1n0 avatar Oct 17 '23 17:10 3v1n0

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).

kriomant avatar Oct 18 '23 03:10 kriomant