* PATCH: completions for AIX commands
@ 2000-07-06 12:32 Oliver Kiddle
0 siblings, 0 replies; only message in thread
From: Oliver Kiddle @ 2000-07-06 12:32 UTC (permalink / raw)
To: zsh-workers
I've made a few changes and additions to the completions for AIX commands.
Oliver
Index: Completion/AIX/_lscfg
===================================================================
RCS file: _lscfg
diff -N _lscfg
--- /dev/null Tue May 5 13:32:27 1998
+++ _lscfg Thu Jul 6 05:29:02 2000
@@ -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
Index: Completion/AIX/_object_classes
===================================================================
RCS file: _object_classes
diff -N _object_classes
--- /dev/null Tue May 5 13:32:27 1998
+++ _object_classes Thu Jul 6 05:29:02 2000
@@ -0,0 +1,6 @@
+#compdef odmget odmshow odme
+
+local expl
+
+_wanted objectclasses expl 'object class' \
+ _files -W ${ODMDIR:-/etc/objrepos} -g '^*.vc'
Index: Completion/AIX/_physical_volumes
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/AIX/_physical_volumes,v
retrieving revision 1.1
diff -u -r1.1 _physical_volumes
--- Completion/AIX/_physical_volumes 2000/04/20 10:47:01 1.1
+++ Completion/AIX/_physical_volumes 2000/07/06 12:29:02
@@ -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)
Index: Completion/AIX/_smit
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/AIX/_smit,v
retrieving revision 1.1
diff -u -r1.1 _smit
--- Completion/AIX/_smit 2000/04/20 10:47:01 1.1
+++ Completion/AIX/_smit 2000/07/06 12:29:02
@@ -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 @@
'-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')
+
Index: Completion/AIX/_volume_groups
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/AIX/_volume_groups,v
retrieving revision 1.1
diff -u -r1.1 _volume_groups
--- Completion/AIX/_volume_groups 2000/04/20 10:47:01 1.1
+++ Completion/AIX/_volume_groups 2000/07/06 12:29:02
@@ -2,4 +2,4 @@
local expl
-_wanted physicalvolumes expl 'physical volumes' compadd - $(lsvg)
+_wanted physicalvolumes expl 'physical volume' compadd - $(lsvg)
Index: Completion/User/_printers
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/User/_printers,v
retrieving revision 1.1
diff -u -r1.1 _printers
--- Completion/User/_printers 2000/04/28 11:20:55 1.1
+++ Completion/User/_printers 2000/07/06 12:29:02
@@ -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=()
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2000-07-06 12:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-07-06 12:32 PATCH: completions for AIX commands Oliver Kiddle
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).