New comment by eli-schwartz on void-packages repository https://github.com/void-linux/void-packages/pull/32767#issuecomment-909769962 Comment: Shell completion systems follow a basic well known pattern, and what we are looking at here is, specifically, how that gets loaded at runtime. There are two basic methods for loading a shell completion: - source it in shell init - source completion file in bashrc/fishrc/zshrc - (bash-only) add file to `/etc/bash_completion.d/`, the "legacy directory", which, if completions are enabled, is looped over and every file in there gets sourced - use a completion auto-loader - bash: completionsdir, tab complete for commands without a defined completion will run `_completion_loader` which in turn runs `__load_completion` and returns successful injection, or falls back to a minimal (defined stub) completion for commands that have no completion file. Upon successfully returning injected completion, it messages bash via `return 124` to retry completion, using the loaded completion - zsh: all fpath contents are scanned and indexed for files containing the comment `#compdef` on the first line, the rest of that line contains a description of the completions the file offers. ONLY IF A COMPDEF EXISTS, that file will then be consulted when you perform a tab completion for that command. The rest of the file then gets sourced dynamically when needed, and is expected to follow very specific styles; a valid compdef file is IIRC incompatible with a valid "just source this in shell init". - fish: my understanding is it works like bash Now, the problem with git-extras should be obvious. None of the files correspond to what you're actually completing. You tab complete `git release ` or something like that, not `git-extras` and not even `git extras`. So, bash and fish will never try to load the completion file, though they will try to load `git.fish` or `/usr/share/bash-completion/completions/git`. And the zsh completion uses zstyle, not `#compdef`. So, this is why none of them, at all, work without manually sourcing the file. The auto-load directories which vcompletion sets up, are useless and do nothing. ... Coincidentally, bash's legacy /etc/bash_completion.d/ directory does work, because the legacy bash completion style was "have some directory and source every file there on startup". Some completions, like git-extras, aren't even compatible with the non-legacy style, so they intentionally install to the legacy dir. The git-extras Makefile does precisely this. `vcompletion etc/bash_completion.sh bash` would install to the `_completion_loader` compatible directory and do nothing. zsh and fish do not have an analogue to bash-completion's legacy dir