mirror of
git://git.code.sf.net/p/zsh/code
synced 2024-10-03 09:21:19 +02:00
13664: */rcS.d/* force-reload, force-restart
This commit is contained in:
parent
c1d5c9372b
commit
d5eeb8d45a
@ -1,3 +1,8 @@
|
||||
2001-03-18 Clint Adams <schizo@debian.org>
|
||||
|
||||
* 13664: Completion/User/_init_d: handle rcS.d, force-restart,
|
||||
force-reload.
|
||||
|
||||
2001-03-18 Peter Stephenson <pws@pwstephenson.fsnet.co.uk>
|
||||
|
||||
* From Zvi Har'El: unposted: Doc/Zsh/metafaq.yo: shorter
|
||||
|
@ -1,4 +1,4 @@
|
||||
#compdef -P */(init|rc[0-9]#).d/*
|
||||
#compdef -P */(init|rc[0-9S]#).d/*
|
||||
|
||||
local magic cmds what
|
||||
|
||||
@ -7,7 +7,7 @@ local magic cmds what
|
||||
# If the file starts with `#!' we hope that this is a shell script
|
||||
# and get lines looking like <space>foo|bar) with the words in $what.
|
||||
|
||||
what='(st(art|op|atus)|re(start|load)|debug_(up|down)|dump(|_stats)|add|delete|clean|list)'
|
||||
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_]} )
|
||||
|
Loading…
Reference in New Issue
Block a user