zsh-users
 help / color / mirror / code / Atom feed
From: "Daniel Shahaf" <d.s@daniel.shahaf.name>
To: "Scott Frazer" <frazer.scott@gmail.com>, zsh-users@zsh.org
Subject: Re: Complete value from list with colons
Date: Sat, 24 Aug 2019 17:26:28 +0000	[thread overview]
Message-ID: <8e5ab665-a4fb-4c75-a4a4-0a0734148b71@www.fastmail.com> (raw)
In-Reply-To: <qjrbd6$2r3q$1@blaine.gmane.org>

Scott Frazer wrote on Sat, 24 Aug 2019 12:44 +00:00:
> I would like to do completion from a list of values that have ':' in 
> them, something like:
> 
> _values foo a::b c::d
> 
> and have it offer 'a::b' and 'c::d' as choices, but I can't figure out 
> how to escape the ':' in the completion system.

Backslashes:

[[[
% _f() { _values desc 'foo\:\:FOO' 'bar\:\:BAR' } 
% f <TAB>
> desc
bar::BAR  foo::FOO
% 
]]]

Cheers,

Daniel

  reply	other threads:[~2019-08-24 17:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-24 12:43 Scott Frazer
2019-08-24 17:26 ` Daniel Shahaf [this message]
2019-08-25  1:18   ` Oliver Kiddle
2019-08-26 13:34     ` Scott Frazer
2019-08-26 17:39       ` dana
2019-08-26 13:28   ` Scott Frazer

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=8e5ab665-a4fb-4c75-a4a4-0a0734148b71@www.fastmail.com \
    --to=d.s@daniel.shahaf.name \
    --cc=frazer.scott@gmail.com \
    --cc=zsh-users@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).