-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Description
For direnv and other similar tools that modify current shell to place user into a transient development environment, it would be useful if we could dynamically load completions and then have a simple way to unload them. (relevant direnv issue)
Fish scans XDG_DATA_DIRS for vendor completions but, unlike bash-completion, it only does so at startup so when the devenv script is sourced and XDG_DATA_DIRS changes, fish will not notice the new completions.
We could have fish re-scan the directories in XDG_DATA_DIRS if the environment variable changes, load completions in the new directories and unload completions that disappeared. Or, if that would be too inefficient, we could have FISH_ENVIRONMENT_COMPLETIONS environment variable explicitly list the completion script paths.