zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: _init_d problem with read options
@ 2003-05-12  9:55 Oliver Kiddle
  2003-05-12 10:17 ` Peter Stephenson
  0 siblings, 1 reply; 2+ messages in thread
From: Oliver Kiddle @ 2003-05-12  9:55 UTC (permalink / raw)
  To: Zsh workers

_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).


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-05-12 10:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-12  9:55 PATCH: _init_d problem with read options Oliver Kiddle
2003-05-12 10:17 ` Peter Stephenson

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).