summary refs log tree commit diff
path: root/Completion/AIX/_logical_volumes
blob: 53949fab2e66ac57f753741974180e8441cf1ea5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#autoload

local expl list names disp

list=( $(lsvg -l $(lsvg)|sed  -e '2d'|awk '/[^:]* / {if ( $7 != "N/A" ) print $1 ":" $7; else print $1}' ) )
names=(${list%%:*})
if zstyle -T ":completion:${curcontext}" verbose; then
  zformat -a list ' -- ' $list
  disp=(-d list)
else
  disp=()
fi
_wanted logicalvolumes expl 'logical volumes' \
    compadd "$disp[@]" "$@" - "$names[@]"