summary refs log tree commit diff
path: root/Completion/AIX/_lsdev
diff options
context:
space:
mode:
authorOliver Kiddle <opk@users.sourceforge.net>2000-04-20 10:47:00 +0000
committerOliver Kiddle <opk@users.sourceforge.net>2000-04-20 10:47:00 +0000
commit3e77ff98c47b6f1c7f949f197cb68ebec734cc86 (patch)
tree2306f863e536809aebfb736a188306571b40bb70 /Completion/AIX/_lsdev
parent4debe47da511d78f9bee5d26926308e640b7bc9f (diff)
downloadzsh-3e77ff98c47b6f1c7f949f197cb68ebec734cc86.tar.gz
zsh-3e77ff98c47b6f1c7f949f197cb68ebec734cc86.tar.xz
zsh-3e77ff98c47b6f1c7f949f197cb68ebec734cc86.zip
Add new completions for AIX commands
Diffstat (limited to 'Completion/AIX/_lsdev')
-rw-r--r--Completion/AIX/_lsdev38
1 files changed, 38 insertions, 0 deletions
diff --git a/Completion/AIX/_lsdev b/Completion/AIX/_lsdev
new file mode 100644
index 000000000..0d249f440
--- /dev/null
+++ b/Completion/AIX/_lsdev
@@ -0,0 +1,38 @@
+#compdef lsdev
+
+local 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:->class' \
+  '-f[read flags from file]:files:_files' \
+  '-F[specify output format]:format:->columnname' \
+  '-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]:columnname:->columnname' \
+  '(-P)-S[specify a device state]:device state:(Available Defined Stopped)' \
+  '-s[specify a device subclass]:device subclass:->subclass' \
+  '-t[specify a device type name]:device type name:->devtype'
+
+case $state in
+  class)
+    _wanted devclass expl 'device class names' \
+        compadd - $(lsdev ${words[(r)-[CP]]:--P} -r class)
+  ;;
+  subclass)
+    _wanted devsubclass expl 'device subclass names' \
+        compadd - $(lsdev ${words[(r)-[CP]]:--P} -r subclass)
+  ;;
+  devtype)
+    _wanted devtype expl 'device type names' \
+        compadd - $(lsdev ${words[(r)-[CP]]:--P} -r type)
+  ;;
+  columnname)
+    [[ $words[CURRENT-1] = -F ]] && compset -P '*[^a-zA-Z]'
+    _wanted devcolumnname expl 'column names' \
+        compadd - ${(s: :)words[(r)-C]:+name status location} \
+	  class subclass description type
+  ;;
+esac