From 78d3b37e11f33e4aef0ad8c8649d7c3479a74884 Mon Sep 17 00:00:00 2001 From: netocrat Date: Fri, 4 Nov 2005 00:35:35 +1000 Subject: [PATCH] Modify fish init scripts to take account of @SYSCONFDIR@ darcs-hash:20051103143535-344c5-203a64cc8bdb14cc018254f6eb74852a1db4843f.gz --- Makefile.in | 4 ++-- configure.ac | 3 ++- init/{fish_complete.fish => fish_complete.fish.in} | 2 +- init/{fish_interactive.fish => fish_interactive.fish.in} | 4 +++- 4 files changed, 8 insertions(+), 5 deletions(-) rename init/{fish_complete.fish => fish_complete.fish.in} (98%) rename init/{fish_interactive.fish => fish_interactive.fish.in} (93%) diff --git a/Makefile.in b/Makefile.in index f0f02230e..55ba32f75 100644 --- a/Makefile.in +++ b/Makefile.in @@ -134,9 +134,9 @@ MAIN_DIR_FILES := Doxyfile Doxyfile.user Makefile.in configure \ config.guess fish_tests.c main.c fish_pager.c fishd.c # Files in ./init/ -INIT_DIR_FILES :=init/fish.in init/fish_complete.fish \ +INIT_DIR_FILES :=init/fish.in init/fish_complete.fish.in \ init/fish_function.fish init/fish_inputrc \ - init/fish_interactive.fish + init/fish_interactive.fish.in # Files in ./tests/ TESTS_DIR_FILES := $(TEST_IN) $(TEST_IN:.in=.out) $(TEST_IN:.in=.err) \ diff --git a/configure.ac b/configure.ac index c7b9b9b0a..7bb0abcb8 100644 --- a/configure.ac +++ b/configure.ac @@ -56,6 +56,7 @@ fi AC_DEFINE_UNQUOTED( DOCDIR, [L"$(eval echo $docdir)"], [Documentation directory] ) AC_DEFINE_UNQUOTED( SYSCONFDIR, [L"$(eval echo $sysconfdir)"], [System configuration directory] ) +AC_SUBST( SYSCONFDIR, ["$(eval echo $sysconfdir)"] ) # See if Linux procfs is present AC_CHECK_FILES([/proc/self/stat]) @@ -127,5 +128,5 @@ AC_CHECK_HEADERS([ncurses.h],[AC_SUBST(CURSESLIB,[ncurses]) AC_DEFINE(HAVE_NCURS #does not properly support terminfo. AC_CHECK_FILE([/usr/pkg/include/ncurses.h],[AC_SUBST(CURSESLIB,[ncurses]) AC_DEFINE(HAVE_NCURSES_H)]) -AC_CONFIG_FILES([Makefile fish.spec doc_src/fish.1 doc_src/Doxyfile init/fish]) +AC_CONFIG_FILES([Makefile fish.spec doc_src/fish.1 doc_src/Doxyfile init/fish init/fish_interactive.fish init/fish_complete.fish]) AC_OUTPUT diff --git a/init/fish_complete.fish b/init/fish_complete.fish.in similarity index 98% rename from init/fish_complete.fish rename to init/fish_complete.fish.in index 7dd6bb4de..989a126e7 100644 --- a/init/fish_complete.fish +++ b/init/fish_complete.fish.in @@ -10,7 +10,7 @@ if not status --is-interactive exit end -set -g fish_complete_path /etc/fish.d/completions ~/.fish.d/completions +set -g fish_complete_path @SYSCONFDIR@/fish.d/completions ~/.fish.d/completions # Knowing the location of the whatis database speeds up command # description lookup. diff --git a/init/fish_interactive.fish b/init/fish_interactive.fish.in similarity index 93% rename from init/fish_interactive.fish rename to init/fish_interactive.fish.in index 024ae74fe..fc55b7785 100644 --- a/init/fish_interactive.fish +++ b/init/fish_interactive.fish.in @@ -39,9 +39,11 @@ end # other than fish, which may use a different file. The new value should # be exported, since the fish inputrc file plays nice with other files # by including them when found. +# Give priority to the default file installed with fish in +# @SYSCONFDIR@/fish_inputrc. # -for i in ~/.fish_inputrc ~/etc/fish_inputrc /etc/fish_inputrc ~/.inputrc /etc/inputrc +for i in ~/.fish_inputrc @SYSCONFDIR@/fish_inputrc ~/etc/fish_inputrc /etc/fish_inputrc ~/.inputrc /etc/inputrc if test -f $i set -xg INPUTRC $i break