zsh-users
 help / color / mirror / code / Atom feed
From: Chmouel Boudjnah <chmouel@mandrakesoft.com>
To: Francis GALIEGUE <fg@mandrakesoft.com>
Cc: zsh-users@sunsite.auc.dk
Subject: Re: zsh and RPM: a case of study (for me)
Date: 29 Sep 1999 21:53:50 +0200	[thread overview]
Message-ID: <m2ln9p4hpt.fsf@vador.mandrakesoft.com> (raw)
In-Reply-To: Francis GALIEGUE's message of "Wed, 29 Sep 1999 19:27:17 +0000"

Francis GALIEGUE <fg@mandrakesoft.com> writes:

How it's you ;),

> Just for example, lets say I have a:
> compctl -X bar -k "(a b)" foo
          ^^

small x "-x"

> how can I do so that it's actually a completion widget which returns the
> "(a b)" stuff? Or am I missing the point completely?

it's depend what you want the  your command if you want the first or
second argument.

> Another probably dumb example: I'm used to the bash key sequences
> (C-x|Esc)(!|@|~|/|$), how can I reproduce them in a simple manner?

i don't understand what you want to reproduce excatly ?

> And for the hardest part now: a set of functions|widgets|whatever for
> rpm...
> I make RPMs quite often indeed, and I'd like:
> rpm -b<whatever> [ --target=whatever ] <TAB>
> to complete on *.spec files,

look in my directory i use this for rpm :

#
_rpmOPT=($(<$HOME/.sh/clist/rpm_options))
_rpmQUE=($(<$HOME/.sh/clist/rpm_query))

function _rpmAVAIL { reply=($(rpm -qa)) }

compctl  -f -x 's[--]' -s "$_rpmOPT" - \
	'W[1,-e]' -K _rpmAVAIL - \
    'p[1] s[-b]' -k '(p l c i b a)' - \
    "c[-1,--queryformat]" -k _rpmQUE -\
    'W[1,-q*] C[-1,-([^-]*|)f*]' -f - \
    'W[1,-qa]' -k '( )' - \
    'W[1,-b*], c[-1,--rmsource]' -g '*.spec' + -f - \
    "c[-1,--recompile], c[-1,--rebuild]" -g '*.src.rpm' + -f -\
    'W[1,-(i|U|q)*], W[1,-([^-]*|)p*]' -g '*.rpm' + -f -\
    -- rpm

unset _rpmOPT

when rpm_options contains :

oldpackage percent replacefiles replacepkgs noscripts root excludedocs includedocs test upgrade test clean short-circuit sign recompile rebuild resign querytags queryformat version help quiet rcfile force hash short-circuit rmsource nodeps

and rpm_query rpm --querytags

-- 
MandrakeSoft          http://www.mandrakesoft.com/
			         	 --Chmouel


  reply	other threads:[~1999-09-30  2:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-09-29 19:27 Francis GALIEGUE
1999-09-29 19:53 ` Chmouel Boudjnah [this message]
1999-09-29 20:11   ` Adam Spiers
1999-09-30 10:03   ` Francis GALIEGUE
1999-09-29 20:10 ` Adam Spiers
1999-09-30  9:05   ` various completion queries Peter Stephenson
1999-09-30 12:19   ` zsh and RPM: a case of study (for me) Francis GALIEGUE
1999-09-30 16:40     ` Chmouel Boudjnah
1999-09-30 19:10     ` Adam Spiers
1999-10-11 12:14 Sven Wischnowsky

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=m2ln9p4hpt.fsf@vador.mandrakesoft.com \
    --to=chmouel@mandrakesoft.com \
    --cc=fg@mandrakesoft.com \
    --cc=zsh-users@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).