From 200a10e78d0df7001c6c2a7c71e7139cccf4277c Mon Sep 17 00:00:00 2001 From: David Adam Date: Tue, 5 Apr 2016 22:22:12 +0800 Subject: Rename "snippets" to "conf" internally, and document them as snippets Discussed in #2896. --- Makefile.in | 6 +++--- configure.ac | 12 ++++++------ doc_src/index.hdr.in | 2 +- fish.pc.in | 2 +- share/__fish_build_paths.fish.in | 4 ++-- share/config.fish | 4 ++-- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Makefile.in b/Makefile.in index b176c5f6..ea008211 100644 --- a/Makefile.in +++ b/Makefile.in @@ -55,7 +55,7 @@ docdir = @docdir@ localedir = @localedir@ extra_completionsdir = @extra_completionsdir@ extra_functionsdir = @extra_functionsdir@ -extra_snippetsdir = @extra_snippetsdir@ +extra_confdir = @extra_confdir@ # # pcre2 @@ -472,7 +472,7 @@ doc.h: $(HDR_FILES) -e "s,@docdir\@,$(docdir),g" \ -e "s,@extra_completionsdir\@,$(extra_completionsdir),g" \ -e "s,@extra_functionsdir\@,$(extra_functionsdir),g" \ - -e "s,@extra_snippetsdir\@,$(extra_snippetsdir),g" \ + -e "s,@extra_confdir\@,$(extra_confdir),g" \ -e "s|@configure_input\@|$@, generated from $@.in by the Makefile. DO NOT MANUALLY EDIT THIS FILE!|g" \ -e "s,@prefix\@,$(prefix),g" \ -e "s,@fish_build_version\@,$(FISH_BUILD_VERSION),g" \ @@ -665,7 +665,7 @@ install-force: all install-translations $(INSTALL) -m 755 -d $(DESTDIR)$(datadir)/fish/completions $(INSTALL) -m 755 -d $(DESTDIR)$(extra_completionsdir) $(INSTALL) -m 755 -d $(DESTDIR)$(extra_functionsdir) - $(INSTALL) -m 755 -d $(DESTDIR)$(extra_snippetsdir) + $(INSTALL) -m 755 -d $(DESTDIR)$(extra_confdir) $(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/configure.ac b/configure.ac index f31825ce..72a210fe 100644 --- a/configure.ac +++ b/configure.ac @@ -877,12 +877,12 @@ AC_ARG_WITH([extra_functionsdir], [extra_functionsdir=$withval], [extra_functionsdir='${datadir}/fish/vendor_functions.d']) -AC_SUBST(extra_snippetsdir) -AC_ARG_WITH([extra-snippetsdir], - AS_HELP_STRING([--with-extra-snippetsdir=DIR], - [path for extra snippets]), - [extra_snippetsdir=$withval], - [extra_snippetsdir='${datadir}/fish/vendor_conf.d']) +AC_SUBST(extra_confdir) +AC_ARG_WITH([extra-confdir], + AS_HELP_STRING([--with-extra-confdir=DIR], + [path for extra conf]), + [extra_confdir=$withval], + [extra_confdir='${datadir}/fish/vendor_conf.d']) # Tell the world what we know. AC_CONFIG_FILES([Makefile]) diff --git a/doc_src/index.hdr.in b/doc_src/index.hdr.in index b75ee5e1..7e889d8e 100644 --- a/doc_src/index.hdr.in +++ b/doc_src/index.hdr.in @@ -1111,7 +1111,7 @@ On startup, Fish evaluates a number of configuration files, which can be used to Configuration files are evaluated in the following order: - Configuration shipped with fish, which should not be edited, usually `/usr/share/fish/config.fish`. - System-wide configuration files, where administrators can include initialization that should be run for all users on the system - similar to `/etc/profile` for POSIX-style shells - usually `/etc/fish/config.fish`; -- "Unit" configuration files ending in `.fish`, in the directories: +- Configuration snippets in files ending in `.fish`, in the directories: - `~/.config/fish/conf.d/` - `/etc/fish/conf.d` - `/usr/share/fish/vendor_conf.d` diff --git a/fish.pc.in b/fish.pc.in index d110a2fb..04fd75ce 100644 --- a/fish.pc.in +++ b/fish.pc.in @@ -2,7 +2,7 @@ prefix=@prefix@ datadir=@datadir@ completionsdir=@extra_completionsdir@ functionsdir=@extra_functionsdir@ -confdir=@extra_snippetsdir@ +confdir=@extra_confdir@ Name: fish Description: fish, the friendly interactive shell diff --git a/share/__fish_build_paths.fish.in b/share/__fish_build_paths.fish.in index 4b923d7e..8308cf50 100644 --- a/share/__fish_build_paths.fish.in +++ b/share/__fish_build_paths.fish.in @@ -1,8 +1,8 @@ # @configure_input@ # This function is generated by the autotools build to "compile in" -# the local "vendor" completions, functions and configuration snippets. +# the local "vendor" completions, functions and configuration conf. # It is sourced by share/config.fish, if it exists. set __extra_completionsdir @extra_completionsdir@ set __extra_functionsdir @extra_functionsdir@ -set __extra_snippetsdir @extra_snippetsdir@ +set __extra_confdir @extra_confdir@ diff --git a/share/config.fish b/share/config.fish index 3f798652..86e8d9b7 100644 --- a/share/config.fish +++ b/share/config.fish @@ -49,7 +49,7 @@ end # third-party packages to ship completions &c. set -l __extra_completionsdir set -l __extra_functionsdir -set -l __extra_snippetsdir +set -l __extra_confdir if test -f $__fish_datadir/__fish_build_paths.fish source $__fish_datadir/__fish_build_paths.fish end @@ -166,7 +166,7 @@ end # As last part of initialization, source the conf directories # Implement precedence (User > Admin > Extra (e.g. vendors) > Fish) by basically doing "basename" set -l sourcelist -for file in $configdir/fish/conf.d/*.fish $__fish_sysconfdir/conf.d/*.fish $__extra_snippetsdir/*.fish +for file in $configdir/fish/conf.d/*.fish $__fish_sysconfdir/conf.d/*.fish $__extra_confdir/*.fish set -l basename (string replace -r '^.*/' '' -- $file) contains -- $basename $sourcelist; and continue set sourcelist $sourcelist $basename -- cgit v1.2.3