mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-22 16:20:23 +02:00
18519: use of read builtin was broken in changes to option parsing
This commit is contained in:
parent
78b02d9c03
commit
68dc356896
2 changed files with 6 additions and 1 deletions
|
@ -14,7 +14,7 @@ script=$words[1]
|
|||
|
||||
what='(st(art|op|atus)|(force-|)re(start|load)|debug_(up|down)|dump(|_stats)|add|delete|clean|list)'
|
||||
|
||||
read -u0k 2 magic < $script && [[ $magic = '#!' ]] &&
|
||||
read -u0 -k2 magic < $script && [[ $magic = '#!' ]] &&
|
||||
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).
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue