From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24809 invoked from network); 6 Jul 2000 12:33:07 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 6 Jul 2000 12:33:07 -0000 Received: (qmail 7612 invoked by alias); 6 Jul 2000 12:33:00 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 12181 Received: (qmail 7604 invoked from network); 6 Jul 2000 12:32:58 -0000 Message-ID: <39647C42.E50A3039@u.genie.co.uk> Date: Thu, 06 Jul 2000 13:32:02 +0100 From: Oliver Kiddle X-Mailer: Mozilla 4.73 [en] (Win95; I) X-Accept-Language: en MIME-Version: 1.0 To: zsh-workers@sunsite.auc.dk Subject: PATCH: completions for AIX commands Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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=()