mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-01-01 05:16:05 +01:00
30429: avoid error in _init_d when service doesn't exist
This commit is contained in:
parent
e49e41725a
commit
8afbb00962
2 changed files with 7 additions and 1 deletions
|
@ -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 $
|
||||
*****************************************************
|
||||
|
|
|
@ -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_]} )
|
||||
|
||||
|
|
Loading…
Reference in a new issue