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

PATCH: _init_d problem with read options



_init_d was broken due to `read -u0k 2' not working after the option
parsing changes.

Oliver

Index: Completion/Unix/Command/_init_d
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_init_d,v
retrieving revision 1.4
diff -u -r1.4 _init_d
--- Completion/Unix/Command/_init_d	21 May 2002 07:58:25 -0000	1.4
+++ Completion/Unix/Command/_init_d	12 May 2003 09:50:19 -0000
@@ -14,7 +14,7 @@
 
 what='(st(art|op|atus)|(force-|)re(start|load)|debug_(up|down)|dump(|_stats)|add|delete|clean|list)'
 
-read -u0k 2 magic < $script && [[ $magic = '#!' ]] &&
+read -u0 -k2 magic < $script && [[ $magic = '#!' ]] &&
     cmds=( ${${(j:|:s:|:)${(M)${(f)"$(< $script)"}:#[[:blank:]]#(\'|)${~what}(\|{~what})#(\'|)\)}}//[^a-z_]} )
 
 # This would be the pattern to use every line of the form <space>foo).



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