about summary refs log tree commit diff
path: root/Completion/Unix/Command/_init_d
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2006-10-10 12:00:57 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2006-10-10 12:00:57 +0000
commitc303529348a7c9171347acb5278370f78e67f7e4 (patch)
tree421598b2b7fbad632db0c58223d83604768eea5b /Completion/Unix/Command/_init_d
parent966a330649bc99092c7a519e48efa07d7978dd40 (diff)
downloadzsh-c303529348a7c9171347acb5278370f78e67f7e4.tar.gz
zsh-c303529348a7c9171347acb5278370f78e67f7e4.tar.xz
zsh-c303529348a7c9171347acb5278370f78e67f7e4.zip
22851: arno: "-" can occur in init script names
Diffstat (limited to 'Completion/Unix/Command/_init_d')
-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..2443febe3 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}(\|${~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...