From d50c051eec9bc212bcf5e1bbc1e16d60ecf6f662 Mon Sep 17 00:00:00 2001 From: axel Date: Thu, 3 Nov 2005 02:49:13 +1000 Subject: Change quoting rules to POSIX style darcs-hash:20051102164913-ac50b-d4b696394e13a2d4c787f8ee1a2b209317dddb51.gz --- init/fish.in | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'init/fish.in') diff --git a/init/fish.in b/init/fish.in index c4014d5c..c202caf3 100644 --- a/init/fish.in +++ b/init/fish.in @@ -16,19 +16,20 @@ set -g IFS \ \t\n # for i in /bin /usr/bin /usr/X11R6/bin @PREFIX@/bin - if test -d $i - if not echo $PATH|grep $i >/dev/null + if not expr "$PATH" : .\*$i.\* >/dev/null + if test -d $i set PATH $PATH $i end end end + # # Set some value for LANG if nothing was set before # if status --is-login - if not count $LANG >/dev/null + if not set -q LANG >/dev/null set -gx LANG en_US.UTF-8 end end @@ -39,13 +40,9 @@ end # situation as well? # -if count $LANG >/dev/null - if test (expr match $LANG ".*UTF") -gt 0 - if count $TERM >/dev/null - if test linux = $TERM - unicode_start ^/dev/null - end - end +if expr match "$LANG" ".*UTF" >/dev/null + if test linux = "$TERM" + unicode_start ^/dev/null end end @@ -56,7 +53,7 @@ end # for i in DISPLAY - if test (count $$i) -gt 1 + if set -q $i set -- $i (printf ":%s" $$i|cut -c 2-) end end -- cgit v1.2.3