about summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
authorPaul Ackersviller <packersv@users.sourceforge.net>2007-11-04 20:05:19 +0000
committerPaul Ackersviller <packersv@users.sourceforge.net>2007-11-04 20:05:19 +0000
commitefcd73c208db7a327220b3da8eb7eee853c81385 (patch)
treecf1673550651f8fb120cbd8329c69dfaf5bf8745 /Completion
parentb5feae1349c2d055a2c5604b02743444a8424de2 (diff)
downloadzsh-efcd73c208db7a327220b3da8eb7eee853c81385.tar.gz
zsh-efcd73c208db7a327220b3da8eb7eee853c81385.tar.xz
zsh-efcd73c208db7a327220b3da8eb7eee853c81385.zip
Merge of 22851: arno: "-" can occur in script names and 22858: options generated from --help text can now be documented.
Diffstat (limited to 'Completion')
-rw-r--r--Completion/Unix/Command/_init_d2
1 files changed, 1 insertions, 1 deletions
diff --git a/Completion/Unix/Command/_init_d b/Completion/Unix/Command/_init_d
index f439e8007..9a5ed9ae7 100644
--- a/Completion/Unix/Command/_init_d
+++ b/Completion/Unix/Command/_init_d
@@ -15,7 +15,7 @@ script=$words[1]
 what='(st(art|op|atus)|(force-|)re(start|load)|debug_(up|down)|dump(|_stats)|add|delete|clean|list)'
 
 read -u0 -k2 magic < $script && [[ $magic = '#!' ]] &&
-    cmds=( ${${(j:|:s:|:)${(M)${(f)"$(< $script)"}:#[[:blank:]]#(\'|)${~what}(\|${~what})#(\'|)\)}}//[^a-z_]} )
+    cmds=( ${${(j:|:s:|:)${(M)${(f)"$(< $script)"}:#[[:blank:]]#(\'|)${~what}([[:blank:]]#\|[[:blank:]]#${~what})#(\'|)\)}}//[^-a-z_]} )
 
 # This would be the pattern to use every line of the form <space>foo).
 # Some people say this might match too many lines...