virsh: replace use of compadd with _describe
compadd is more low-level and doesn't setup completion descriptions correctly. Notably, the description is not put in bold.
This commit is contained in:
parent
29c11456af
commit
18330b0137
|
@ -41,7 +41,7 @@ local -a args reply
|
||||||
function _virsh-domains() {
|
function _virsh-domains() {
|
||||||
local -a out
|
local -a out
|
||||||
out=( ${${${${(f)"$(virsh list "$@")"}:#(---| Id)*}## #[0-9]## ##}%% *} )
|
out=( ${${${${(f)"$(virsh list "$@")"}:#(---| Id)*}## #[0-9]## ##}%% *} )
|
||||||
compadd -x "${${1#--}:-running} domains" -a out
|
_describe -t domains "${${1#--}:-running} domains" out
|
||||||
return $?
|
return $?
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue