From: Jonathan Nieder Date: Fri, 03 Dec 2010 17:08:00 GMT Subject: Re: [PATCHv2 7/7] web--browse: look at the BROWSER env var Message-ID: <20101203170800.GE12910@burratino> In-Reply-To: <1291394861-11989-8-git-send-email-giuseppe.bilotta@gmail.com> Giuseppe Bilotta wrote: > --- a/git-web--browse.sh > +++ b/git-web--browse.sh > @@ -138,6 +138,51 @@ then [...] > +if test -z "$browser" -a -n "$BROWSER"; then > + OLDIFS="$IFS" > + IFS=: [...] > + IFS="$OLDIFS" Micronit: on some shells (e.g., old ash[1]), IFS starts out unset if it hasn't been inherited in the environment. How about something like this? LF=" " usual_ifs=" $LF" IFS=: ... IFS=$usual_ifs ... IFS=$usual_ifs Based on [2] I would guess that any POSIX-style shell would also support IFS=: ... unset IFS ... unset IFS but maybe that's playing with fire. The rest of this series looks quite nice, so Acked-by: Jonathan Nieder [1] http://bugs.debian.org/95856 [2] http://www.in-ulm.de/~mascheck/various/ifs/