diff options
author | npilon <npilon@gmail.com> | 2006-03-14 05:07:24 +1000 |
---|---|---|
committer | npilon <npilon@gmail.com> | 2006-03-14 05:07:24 +1000 |
commit | 99a93b5add6ce77b619f8b72499dc58a91024522 (patch) | |
tree | ab181870847d08647f666b5e7800b924d2b446de | |
parent | de50539c026391bb7da789fc0d2c2fd38edb336f (diff) |
Fish PATH Fix
Moved PATH detection code to the start of share/fish.
darcs-hash:20060313190724-c90d9-8e2e80910041e91b48d68154e9d8180d04689463.gz
-rw-r--r-- | Makefile.in | 2 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | etc/fish.in | 3 | ||||
-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. # |