zsh-workers
 help / color / mirror / code / Atom feed
From: Clint Adams <clint@zsh.org>
To: zsh-workers@sunsite.dk
Subject: PATCH: _analyseplugin
Date: Fri, 31 Mar 2006 09:13:39 -0500	[thread overview]
Message-ID: <20060331141339.GA17854@scowler.net> (raw)

Can't commit to CVS since sourceforge is broken right now.

--- /dev/null
+++ mod/Completion/Linux/Command/_analyseplugin
@@ -0,0 +1,25 @@
+#compdef analyseplugin
+
+local expl context state line nopts ret=1
+typeset -A opt_args
+
+_arguments \
+    '-l[Gives a brief listing (one line per plugin)]' \
+    '(-)1:plugin file:->pfile' \
+    '(-)2::plugin label:->plabel' && ret=0
+
+case "$state" in
+    pfile)
+	_wanted plugin-files expl 'plugin file' compadd \
+	    ${~${^${${(f)"$(_call_program ladspa-plugins listplugins 2> /dev/null)"}:#[[:space:]]*}/%:/(:t:r)}} \
+	    && return
+	;;
+    plabel)
+	typeset -a plabel
+	nopts=(${words:#-*})
+	plabel=(${${(f)"$($nopts[1] -l $nopts[2] 2> /dev/null)"}/[[:space:]]##/:})
+	_describe -t plugin-label 'plugin label' plabel && return
+	;;
+esac
+
+return ret



                 reply	other threads:[~2006-03-31 14:13 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=20060331141339.GA17854@scowler.net \
    --to=clint@zsh.org \
    --cc=zsh-workers@sunsite.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).