summaryrefslogtreecommitdiff
path: root/Completion/Unix/Command/_init_d
diff options
context:
space:
mode:
authorAxel Beckert <abe@deuxchevaux.org>2012-07-22 21:40:10 +0200
committerAxel Beckert <abe@deuxchevaux.org>2012-07-22 21:40:10 +0200
commit5c7ac461932c17df91374e6c2740ad22c95481af (patch)
tree85d21004331d9d1bfca266d111000acd7fa1725a /Completion/Unix/Command/_init_d
parent3988419a8dc4a74e491df584804a77a2f8be88cd (diff)
parente27142d45686cacc6ed155e5045b97dd6243d44c (diff)
downloadzsh-5c7ac461932c17df91374e6c2740ad22c95481af.tar.gz
zsh-5c7ac461932c17df91374e6c2740ad22c95481af.zip
New upstream release
Diffstat (limited to 'Completion/Unix/Command/_init_d')
-rw-r--r--Completion/Unix/Command/_init_d1
1 files changed, 1 insertions, 0 deletions
diff --git a/Completion/Unix/Command/_init_d b/Completion/Unix/Command/_init_d
index dd9933a46..bbf62fc0d 100644
--- a/Completion/Unix/Command/_init_d
+++ b/Completion/Unix/Command/_init_d
@@ -68,6 +68,7 @@ else
what='(st(art|op|atus)|(force-|)re(start|load)|debug_(up|down)|dump(|_stats)|add|delete|clean|list)'
+ [[ -x $script ]] || return 1
read -u0 -k2 magic < $script && [[ $magic = '#!' ]] &&
cmds=( ${${(j:|:s:|:)${(M)${(f)"$(< $script)"}:#[[:blank:]]#(\'|)${~what}([[:blank:]]#\|[[:blank:]]#${~what})#(\'|)\)}}//[^-a-z_]} )