diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | Completion/Unix/Command/_init_d | 1 |
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog index c23237baa..68f9922a6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-04-25 Mikael Magnusson <mikachu@gmail.com> + + * 30429: Completion/Unix/Command/_init_d: Avoid error when the + service doesn't exist. + 2012-04-22 Peter Stephenson <p.w.stephenson@ntlworld.com> * unposted: Src/subst.c: add test for valid identifier to 30431. @@ -16237,5 +16242,5 @@ ***************************************************** * This is used by the shell to define $ZSH_PATCHLEVEL -* $Revision: 1.5639 $ +* $Revision: 1.5640 $ ***************************************************** 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_]} ) |