mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-01-19 02:42:51 +08:00
Add sbin directories to PATH when root
darcs-hash:20051220090155-ac50b-2a0a54dda98086cae3329dc31a71f28774bddf46.gz
This commit is contained in:
parent
cdbd233e62
commit
00778832f1
11
init/fish.in
11
init/fish.in
|
@ -15,7 +15,14 @@ set -g IFS \ \t\n
|
|||
# want this even for text-only terminals.
|
||||
#
|
||||
|
||||
for i in /bin /usr/bin /usr/X11R6/bin @PREFIX@/bin
|
||||
set -l path_list /bin /usr/bin /usr/X11R6/bin @PREFIX@/bin
|
||||
|
||||
set -l uid (id -u 2>/dev/null)
|
||||
if test "$uid" = 0
|
||||
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
|
||||
|
@ -24,6 +31,8 @@ for i in /bin /usr/bin /usr/X11R6/bin @PREFIX@/bin
|
|||
end
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
# Set some value for LANG if nothing was set before
|
||||
#
|
||||
|
|
Loading…
Reference in New Issue
Block a user