diff --git a/Makefile.in b/Makefile.in index 32a628604..00b5a6c17 100644 --- a/Makefile.in +++ b/Makefile.in @@ -621,6 +621,7 @@ install-force: all install-translations $(INSTALL) -m 755 -d $(DESTDIR)$(sysconfdir)/fish $(INSTALL) -m 755 -d $(DESTDIR)$(datadir)/fish $(INSTALL) -m 755 -d $(DESTDIR)$(datadir)/fish/completions + $(INSTALL) -m 755 -d $(DESTDIR)$(datadir)/fish/vendor_completions.d $(INSTALL) -m 755 -d $(DESTDIR)$(datadir)/fish/functions $(INSTALL) -m 755 -d $(DESTDIR)$(datadir)/fish/man/man1 $(INSTALL) -m 755 -d $(DESTDIR)$(datadir)/fish/tools diff --git a/doc_src/index.hdr.in b/doc_src/index.hdr.in index 4118cee86..b472d9578 100644 --- a/doc_src/index.hdr.in +++ b/doc_src/index.hdr.in @@ -377,9 +377,9 @@ Functions beginning with the string `__fish_print_` print a newline separated li Completions can be defined on the commandline or in a configuration file, but they can also be automatically loaded. Fish automatically searches through any directories in the array variable `$fish_complete_path`, and any completions defined are automatically loaded when needed. A completion file must have a filename consisting of the name of the command to complete and the suffix '`.fish`'. -The default value for `$fish_complete_path` is `~/.config/fish/completions` `/etc/fish/completions` `/usr/share/fish/completions`. The exact path to the last two of these may be slightly different depending on what install path prefix was chosen at configuration time. If a suitable file is found in one of these directories, it will be automatically loaded and the search will be stopped. The rationale behind having three different directories is that the first one is for user specific completions, the second one is for system-wide completions and the last one is for default fish completions. +The default value for `$fish_complete_path` is `~/.config/fish/completions` `/etc/fish/completions` `/usr/share/fish/vendor_completions.d` `/usr/share/fish/completions` `~/.local/share/generated_completions`. (Some paths may be slightly different depending on where fish is installed). If a suitable file is found in one of these directories, it will be automatically loaded and the search will be stopped. The large number of directories searched may be confusing. It is to allow, respectively, user-specific completions, system-wide completions, completions installed by other packages, default completions that ship with fish, and finally, completions generated from manual pages. If you are unsure, put your completions in `~/.config/fish/completions`. -If you have written new completions for a common Unix command, please consider sharing your work by submitting it via the instructions in Further help and development. +If you have written new completions for a common Unix command, please consider sharing your work by submitting it via the instructions in Further help and development. If you are developing another program and would like to ship completions with your program, install them to `/usr/share/fish/vendor_completions.d`. \section expand Parameter expansion (Globbing) diff --git a/share/config.fish b/share/config.fish index b681d189a..75d8cb478 100644 --- a/share/config.fish +++ b/share/config.fish @@ -57,7 +57,7 @@ if not contains $__fish_datadir/functions $fish_function_path end if not set -q fish_complete_path - set fish_complete_path $configdir/fish/completions $__fish_sysconfdir/completions $__fish_datadir/completions $userdatadir/fish/generated_completions + set fish_complete_path $configdir/fish/completions $__fish_sysconfdir/completions $__fish_datadir/vendor_completions.d $__fish_datadir/completions $userdatadir/fish/generated_completions end if not contains $__fish_datadir/completions $fish_complete_path