Thread (13 messages) flat view 13 messages, 4 authors, 2016-06-15

Re: [PATCHv2 7/7] web--browse: look at the BROWSER env var

From: Jonathan Nieder <hidden>
Date: 2016-06-15 22:50:10

Giuseppe Bilotta wrote:
quoted hunk ↗ jump to hunk
--- 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 <redacted>

[1] http://bugs.debian.org/95856
[2] http://www.in-ulm.de/~mascheck/various/ifs/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help