Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: _diff



On Feb 10, 12:58pm, Oliver Kiddle wrote:
} Subject: PATCH: _diff
}
} This may have already been fixed but the diff completion seemed to call
} diff with /dev/null as stdin but not stdout and stderr.

I got "malformed patch" from this; line wrapping.

But why not use the more compact zsh syntax?  This instead of Oliver's:

Index: Completion/User/_diff_options
===================================================================
@@ -4,7 +4,7 @@
 
 (( $+_diff_is_gnu )) || {
 	_diff_is_gnu=0;
-        [[ $(command diff -v </dev/null) == *GNU* ]] && _diff_is_gnu=1
+        [[ $(command diff -v >&/dev/null) == *GNU* ]] && _diff_is_gnu=1
 }
 
 if (( _diff_is_gnu ))

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com



Messages sorted by: Reverse Date, Date, Thread, Author