From 80ff583400301d1357cb90bdb16ef8f373650dc4 Mon Sep 17 00:00:00 2001 From: axel Date: Thu, 5 Oct 2006 03:55:19 +1000 Subject: [PATCH] Use universal variables for fish_function_path and fish_complete_path darcs-hash:20061004175519-ac50b-2e9dabc9ce1c21ebfcba020db8a8d84ef48433e9.gz --- etc/fish.in | 7 ------- share/fish.in | 16 +++++++++++++--- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/etc/fish.in b/etc/fish.in index 5b5c72edf..1c85fb287 100644 --- a/etc/fish.in +++ b/etc/fish.in @@ -3,13 +3,6 @@ # # @configure_input@ -# -# Set default search paths for completions and shellscript functions -# - -set -g fish_function_path ~/.fish.d/functions @sysconfdir@/fish.d/functions @datadir@/fish/functions -set -g fish_complete_path ~/.fish.d/completions @sysconfdir@/fish.d/completions @datadir@/fish/completions - # # Set default field separators # diff --git a/share/fish.in b/share/fish.in index 0cc0ac503..b1d88b784 100644 --- a/share/fish.in +++ b/share/fish.in @@ -5,10 +5,20 @@ # # @configure_input@ -# Assign a temporary value here for performance reasons. The real -# value should be set in /etc/fish. +# +# Set default search paths for completions and shellscript functions +# unless they already exist +# + +if not set -q fish_function_path + set -U fish_function_path ~/.fish.d/functions @sysconfdir@/fish.d/functions @datadir@/fish/functions +end + +if not set -q fish_complete_path + set -U fish_complete_path ~/.fish.d/completions @sysconfdir@/fish.d/completions @datadir@/fish/completions +end + -set -g fish_function_path @datadir@/fish/functions/ set __fish_help_dir @docdir@ # This is a Solaris-specific test to modify the PATH so that