mirror of
git://git.code.sf.net/p/zsh/code
synced 2024-11-19 13:33:52 +01:00
16514: initscript completion fixes
This commit is contained in:
parent
a2deb3854a
commit
c3e0113d1c
@ -1,3 +1,10 @@
|
||||
2002-01-29 Clint Adams <clint@zsh.org>
|
||||
|
||||
* 16514: Completion/Unix/Command/_init_d: do not attempt
|
||||
to read file if it doesn't exist, match pipe-separated lists
|
||||
and characters following the parenthesis, and don't wantonly
|
||||
remove hyphens from completions.
|
||||
|
||||
2002-01-28 Sven Wischnowsky <wischnow@zsh.org>
|
||||
|
||||
* 16507: Completion/Zsh/Type/_command_names: slight improvement
|
||||
|
@ -9,8 +9,8 @@ local magic cmds what
|
||||
|
||||
what='(st(art|op|atus)|(force-|)re(start|load)|debug_(up|down)|dump(|_stats)|add|delete|clean|list)'
|
||||
|
||||
read -u0k 2 magic < $words[1] && [[ $magic = '#!' ]] &&
|
||||
cmds=( ${${(j:|:s:|:)${(M)${(f)"$(< $words[1])"}:#[[:blank:]]#(\'|)${~what}(|${~what})#(\'|)\)}}//[^a-z_]} )
|
||||
[[ -f $words[1] ]] && read -u0k 2 magic < $words[1] && [[ $magic = '#!' ]] &&
|
||||
cmds=( ${${(j:|:s:|:)${(M)${(f)"$(< $words[1])"}:#[[: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...
|
||||
|
Loading…
Reference in New Issue
Block a user