From: Oliver Kiddle <okiddle@yahoo.co.uk>
To: "Danek Duvall" <duvall@comfychair.org>,
"Štěpán Němec" <stepnem@gmail.com>,
zsh-workers@zsh.org
Subject: Re: completing a comma-separated pair of values
Date: Sun, 06 Mar 2011 23:28:16 +0100 [thread overview]
Message-ID: <9974.1299450496@thecus> (raw)
In-Reply-To: <20110305141540.GB18627@lorien.comfychair.org>
Danek Duvall wrote:
>
> Here's the function I ended up with:
>
> if [[ $words[$CURRENT] == *,* ]]; then
I may have misunderstood this but you can use the return status of
compset -P directly so that you possibly don't need this. e.g:
if compset -P '*,'; then
> The only problem is that (I think) this may need to be completed in a
> longer series of comma-separated values:
You can also do a while loop if there's no particular ordering to
things in the list: while compset -P '*,' Otherwise, use elif for each
component.
Oliver
next prev parent reply other threads:[~2011-03-06 22:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-03 23:00 Danek Duvall
2011-03-03 23:27 ` Mikael Magnusson
2011-03-03 23:58 ` Danek Duvall
2011-03-05 1:00 ` Danek Duvall
2011-03-05 9:20 ` Štěpán Němec
2011-03-05 14:15 ` Danek Duvall
2011-03-06 22:28 ` Oliver Kiddle [this message]
2011-03-06 22:59 ` Danek Duvall
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=9974.1299450496@thecus \
--to=okiddle@yahoo.co.uk \
--cc=duvall@comfychair.org \
--cc=stepnem@gmail.com \
--cc=zsh-workers@zsh.org \
/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).