zsh-workers
 help / color / mirror / code / Atom feed
From: Oliver Kiddle <opk@u.genie.co.uk>
To: zsh-workers@sunsite.auc.dk
Subject: PATCH: completions for AIX commands
Date: Thu, 06 Jul 2000 13:32:02 +0100	[thread overview]
Message-ID: <39647C42.E50A3039@u.genie.co.uk> (raw)

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=()


                 reply	other threads:[~2000-07-06 12:33 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=39647C42.E50A3039@u.genie.co.uk \
    --to=opk@u.genie.co.uk \
    --cc=zsh-workers@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).