Re: Include XDG_DATA_DIRS/share/zsh/site-functions in FPATH by default?
Jade Lovelace <[email protected]>
| Newsgroups | gmane.comp.shells.zsh.user |
|---|---|
| Message-ID | <CAC_G=DYgOUf2g0orH-qgNYAOhxz=MPf0V4ucg1zNR179jY8MGQ@mail.gmail.com> |
Thanks for the quick reply! > No, bash does not use XDG. The "bash-completion" project is > a third-party effort that is not affiliated with the GNU bash > project. This is true, but so many distros ship bash-completion to the extent that it can be assumed to be what we're dealing with for the purposes of completion as third party software authors, so it can be considered one and the same in this context. > > I am wondering if zsh has considered doing this by default as well, as > > it makes zsh integrate cleanly with other tooling that uses > > XDG_DATA_DIRS without specially needing to consider adding zsh > > specific code to handle FPATH. > > This is not about fpath, but it is representative of the developers' > general position on XDG support. > > https://www.zsh.org/mla/workers/2024/msg00012.html I see. This is somewhat disappointing. To add some more context, what I am actually trying to do at the moment is to make zsh completion work for developers at work who are using CLI environments provisioned via direnv and nix. Currently direnv doesn't allow running things in the actual shell that someone's using to e.g. set up completion: https://github.com/direnv/direnv/issues/443 This *would* be okay in principle if I could just set an environment variable to add more completions to zsh without nuking FPATH, but I just found out that if direnv sets FPATH, it overwrites it rather than appending/prepending it, which then breaks the default zsh functions if the user's zshrc doesn't export FPATH. This would, for instance, be resolved by searching XDG_DATA_DIRS for completions, since it would not *directly* overwrite FPATH. Regards, Jade