aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--Makefile.in2
-rw-r--r--configure.ac2
-rw-r--r--etc/fish.in3
-rw-r--r--share/fish.in (renamed from share/fish)21
4 files changed, 23 insertions, 5 deletions
diff --git a/Makefile.in b/Makefile.in
index 12176df5..c37cd7fb 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -179,7 +179,7 @@ ETC_DIR_FILES :=etc/fish.in etc/fish_inputrc \
etc/fish_interactive.fish.in
# Files in ./share/
-SHARE_DIR_FILES :=share/fish
+SHARE_DIR_FILES :=share/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 49135507..de3b4756 100644
--- a/configure.ac
+++ b/configure.ac
@@ -292,7 +292,7 @@ else
fi
# Tell the world what we know
-AC_CONFIG_FILES([Makefile fish.spec doc_src/fish.1 doc_src/Doxyfile etc/fish etc/fish_interactive.fish seq])
+AC_CONFIG_FILES([Makefile fish.spec doc_src/fish.1 doc_src/Doxyfile etc/fish etc/fish_interactive.fish share/fish seq])
AC_OUTPUT
echo "fish is now configured."
diff --git a/etc/fish.in b/etc/fish.in
index b05a27dc..90da43ef 100644
--- a/etc/fish.in
+++ b/etc/fish.in
@@ -24,10 +24,7 @@ set -g IFS \ \t\n
set -l path_list /bin /usr/bin /usr/X11R6/bin @PREFIX@/bin @optbindirs@
-#
# Root should also have the sbin directories in the path
-#
-
if test "$USER" = root
set path_list $path_list /sbin /usr/sbin /usr/local/sbin
end
diff --git a/share/fish b/share/fish.in
index f3b1a273..a74e7438 100644
--- a/share/fish
+++ b/share/fish.in
@@ -5,6 +5,27 @@
#
#
+# Add a few common directories to path, if they exists. Note that pure
+# console programs like makedep sometimes live in /usr/X11R6/bin, so we
+# want this even for text-only terminals.
+#
+
+set -l path_list /bin /usr/bin /usr/X11R6/bin @PREFIX@/bin @optbindirs@
+
+# Root should also have the sbin directories in the path
+if test "$USER" = root
+ set path_list $path_list /sbin /usr/sbin /usr/local/sbin
+end
+
+for i in $path_list
+ if not expr "$PATH" : .\*$i.\* >/dev/null
+ if test -d $i
+ set PATH $PATH $i
+ end
+ end
+end
+
+#
# Assign a temporary value here for performance reasons. The real value should be set in /etc/fish.
#