From 26785dfe6b5e36e520934585f91aaa44704bba75 Mon Sep 17 00:00:00 2001 From: Paul Ackersviller Date: Thu, 3 May 2007 02:49:38 +0000 Subject: Merge from trunk of files in 21315. --- Completion/AIX/Command/_floppy | 5 +++++ Completion/AIX/Command/_lsdev | 38 +++++++++++++++++++++++++++++++++++ Completion/AIX/Command/_lslv | 8 ++++++++ Completion/AIX/Command/_lsvg | 10 +++++++++ Completion/AIX/Type/_logical_volumes | 15 ++++++++++++++ Completion/AIX/Type/_object_classes | 6 ++++++ Completion/AIX/Type/_physical_volumes | 6 ++++++ Completion/AIX/Type/_volume_groups | 5 +++++ 8 files changed, 93 insertions(+) create mode 100644 Completion/AIX/Command/_floppy create mode 100644 Completion/AIX/Command/_lsdev create mode 100644 Completion/AIX/Command/_lslv create mode 100644 Completion/AIX/Command/_lsvg create mode 100644 Completion/AIX/Type/_logical_volumes create mode 100644 Completion/AIX/Type/_object_classes create mode 100644 Completion/AIX/Type/_physical_volumes create mode 100644 Completion/AIX/Type/_volume_groups (limited to 'Completion/AIX') diff --git a/Completion/AIX/Command/_floppy b/Completion/AIX/Command/_floppy new file mode 100644 index 000000000..3dd3ee8e1 --- /dev/null +++ b/Completion/AIX/Command/_floppy @@ -0,0 +1,5 @@ +#compdef dosread dosdel + +local expl + +_wanted floppyfiles expl 'file on floppy' compadd - ${$(dosdir)[1,-5]:l} diff --git a/Completion/AIX/Command/_lsdev b/Completion/AIX/Command/_lsdev new file mode 100644 index 000000000..c54ed7637 --- /dev/null +++ b/Completion/AIX/Command/_lsdev @@ -0,0 +1,38 @@ +#compdef lsdev + +local curcontext="${curcontext}" state line expl + +_arguments -C \ + '(-P)-C[list info about device in customized devices object class]' \ + '(-C -l)-P[list info about device in predefined object class]' \ + '-c[specify a device class]:device class:->classes' \ + '-f[read flags from file]:file:_files' \ + '-F[specify output format]:format:->columnnames' \ + '-H[display headers above columns]' \ + '-h[display command usage]' \ + '(-P)-l[specify device logical name]:device logical name' \ + '-r[display set of values in a column]:column name:->columnnames' \ + '(-P)-S[specify a device state]:device state:(Available Defined Stopped)' \ + '-s[specify a device subclass]:device subclass:->subclasses' \ + '-t[specify a device type name]:device type name:->devtypes' && return 0 + +case $state in + classes) + _wanted devclasses expl 'device class name' \ + compadd - $(lsdev ${words[(r)-[CP]]:--P} -r class) + ;; + subclasses) + _wanted devsubclasses expl 'device subclass name' \ + compadd - $(lsdev ${words[(r)-[CP]]:--P} -r subclass) + ;; + devtypes) + _wanted devtypes expl 'device type name' \ + compadd - $(lsdev ${words[(r)-[CP]]:--P} -r type) + ;; + columnnames) + [[ $words[CURRENT-1] = -F ]] && compset -P '*[^a-zA-Z]' + _wanted devcolumnnames expl 'column name' \ + compadd - ${(s: :)words[(r)-C]:+name status location} \ + class subclass description type + ;; +esac diff --git a/Completion/AIX/Command/_lslv b/Completion/AIX/Command/_lslv new file mode 100644 index 000000000..5145c48cc --- /dev/null +++ b/Completion/AIX/Command/_lslv @@ -0,0 +1,8 @@ +#compdef lslv + +_arguments -C -s \ + '(-l -m)-p[display logical volume allocation map for the physical volume]:pv:_physical_volumes' \ + '(-p)-l[list physical volumes in logical volume]' \ + '(-p)-m[list partition numbers]' \ + '-n[accesses information from the descriptor area of physical volume]:pv:_physical_volumes' \ + '1:lv: _logical_volumes' diff --git a/Completion/AIX/Command/_lsvg b/Completion/AIX/Command/_lsvg new file mode 100644 index 000000000..028a670ba --- /dev/null +++ b/Completion/AIX/Command/_lsvg @@ -0,0 +1,10 @@ +#compdef lsvg + +_arguments -C -s \ + '(-i -l -M -p)-o[lists only active volume groups]' \ + '(-i -l -M -p)-n[specify physical volume to access variable descriptor from]:physical volume:_physical_volumes' \ + '(-o -n)-i[reads volume group names from standard input]' \ + '(-o -n -M -p)-l[list logical volumes in volume group]' \ + '(-o -n -l -p)-M[list mapping of physical and logical partition numbers]' \ + '(-o -n -l -M)-p[list physical volumes used by volume group]' \ + '*:volume group:_volume_groups' diff --git a/Completion/AIX/Type/_logical_volumes b/Completion/AIX/Type/_logical_volumes new file mode 100644 index 000000000..bbfa09238 --- /dev/null +++ b/Completion/AIX/Type/_logical_volumes @@ -0,0 +1,15 @@ +#autoload + +local expl list names disp sep + +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 + zstyle -s ":completion:${curcontext}:" list-separator sep || sep=-- + zformat -a list " $sep " $list + disp=(-d list) +else + disp=() +fi +_wanted logicalvolumes expl 'logical volume' \ + compadd "$disp[@]" "$@" - "$names[@]" diff --git a/Completion/AIX/Type/_object_classes b/Completion/AIX/Type/_object_classes new file mode 100644 index 000000000..a0d669ca3 --- /dev/null +++ b/Completion/AIX/Type/_object_classes @@ -0,0 +1,6 @@ +#compdef odmget odmshow odme + +local expl + +_wanted objectclasses expl 'object class' \ + _files -W ${ODMDIR:-/etc/objrepos} -g '^*.vc(-.)' "$@" - diff --git a/Completion/AIX/Type/_physical_volumes b/Completion/AIX/Type/_physical_volumes new file mode 100644 index 000000000..fd31edd09 --- /dev/null +++ b/Completion/AIX/Type/_physical_volumes @@ -0,0 +1,6 @@ +#autoload + +local expl + +_wanted physicalvolumes expl 'physical volume' \ + compadd "$@" - $(lsdev -C -c disk -S a -F name) diff --git a/Completion/AIX/Type/_volume_groups b/Completion/AIX/Type/_volume_groups new file mode 100644 index 000000000..8b8bebfa6 --- /dev/null +++ b/Completion/AIX/Type/_volume_groups @@ -0,0 +1,5 @@ +#autoload + +local expl + +_wanted volumegroups expl 'volume group' compadd "$@" - $(lsvg) -- cgit 1.4.1