summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
authorOliver Kiddle <opk@users.sourceforge.net>2000-07-06 12:40:00 +0000
committerOliver Kiddle <opk@users.sourceforge.net>2000-07-06 12:40:00 +0000
commit1c28d8c21fe9624b1b9b2fc8293b3c462fa61ecf (patch)
tree9a0149ecdd86bcf6bd868f772fad35992b5aefad /Completion
parentb0337944b4b85be85c8835a07112e02bcec5e675 (diff)
downloadzsh-1c28d8c21fe9624b1b9b2fc8293b3c462fa61ecf.tar.gz
zsh-1c28d8c21fe9624b1b9b2fc8293b3c462fa61ecf.tar.xz
zsh-1c28d8c21fe9624b1b9b2fc8293b3c462fa61ecf.zip
updates and additions to completions for AIX commands
Diffstat (limited to 'Completion')
-rw-r--r--Completion/AIX/_lscfg21
-rw-r--r--Completion/AIX/_object_classes6
-rw-r--r--Completion/AIX/_physical_volumes2
-rw-r--r--Completion/AIX/_smit10
-rw-r--r--Completion/AIX/_volume_groups2
-rw-r--r--Completion/User/_printers8
6 files changed, 45 insertions, 4 deletions
diff --git a/Completion/AIX/_lscfg b/Completion/AIX/_lscfg
new file mode 100644
index 000000000..4667a0bd7
--- /dev/null
+++ b/Completion/AIX/_lscfg
@@ -0,0 +1,21 @@
+#compdef lscfg
+
+local state line expl curcontext="$curcontext" disp list devs
+
+_arguments -C -s \
+  '-l[display device information for named device]:device:->device' \
+  '-v[display vital product data for physical devices]' && return 0
+
+if [[ "$state" = device ]]; then
+  devs=( ${${${${(f)"$(lscfg)"}[6,-1]:# *}##??}/ ##[^ ]# #/:} )
+  if zstyle -T ":completion:${curcontext}:devices" verbose; then
+    zformat -a list ' -- ' "$devs[@]"
+    disp=(-ld list)
+  else
+    disp=()
+  fi
+  _wanted devices expl 'device' compadd "$disp[@]" - "${devs[@]%%:*}"
+  return
+fi
+
+return 1
diff --git a/Completion/AIX/_object_classes b/Completion/AIX/_object_classes
new file mode 100644
index 000000000..225f669b1
--- /dev/null
+++ b/Completion/AIX/_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/_physical_volumes b/Completion/AIX/_physical_volumes
index 1b69d6217..b53054823 100644
--- a/Completion/AIX/_physical_volumes
+++ b/Completion/AIX/_physical_volumes
@@ -2,5 +2,5 @@
 
 local expl
 
-_wanted physicalvolumes expl 'physical volumes' \
+_wanted physicalvolumes expl 'physical volume' \
     compadd - $(lsdev -C -c disk -S a -F name)
diff --git a/Completion/AIX/_smit b/Completion/AIX/_smit
index 18a901148..48397b5b0 100644
--- a/Completion/AIX/_smit
+++ b/Completion/AIX/_smit
@@ -1,5 +1,7 @@
 #compdef smit smitty
 
+local state line expl curcontext="$curcontext"
+
 _arguments -C \
   '-s[specify smit.script file]:smit.script file:_files' \
   '-l[specify smit.log file]:smit.log file:_files' \
@@ -15,5 +17,11 @@ _arguments -C \
   '-t[generate trace information]' \
   '-v[verbose]' \
   '-x[do not run any execute commands]' \
-  '-X[do not run any commands]'
+  '-X[do not run any commands]' \
+  '1:fastpath:->fastpath' && return 0
+
+[[ "$state" = fastpath ]] &&
+  _wanted fastpaths expl 'fast path' compadd \
+      $(odmget sm_cmd_hdr sm_name_hdr|sed -n 's/^	id = \"\(.*\)\"/\1/p')
+
   
diff --git a/Completion/AIX/_volume_groups b/Completion/AIX/_volume_groups
index 33752ca2a..dc509f6dc 100644
--- a/Completion/AIX/_volume_groups
+++ b/Completion/AIX/_volume_groups
@@ -2,4 +2,4 @@
 
 local expl
 
-_wanted physicalvolumes expl 'physical volumes' compadd - $(lsvg)
+_wanted physicalvolumes expl 'physical volume' compadd - $(lsvg)
diff --git a/Completion/User/_printers b/Completion/User/_printers
index a84a5e559..d98fa433a 100644
--- a/Completion/User/_printers
+++ b/Completion/User/_printers
@@ -2,10 +2,16 @@
 
 local expl ret=1 list disp
 
+if (( $+commands[lsallq] )); then
+  # Use AIX's command to list print queues
+  _wanted printers expl printer compadd $(lsallq)
+  return
+fi
+
 if (( ! $+_lp_cache )); then
   local file entry names i
 
-   file=( /etc/(printcap|printers.conf)(N) )
+  file=( /etc/(printcap|printers.conf)(N) )
 
   _lp_cache=()
   _lp_alias_cache=()