Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Complete value from list with colons
- X-seq: zsh-users 24184
- From: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- To: "Scott Frazer" <frazer.scott@xxxxxxxxx>, zsh-users@xxxxxxx
- Subject: Re: Complete value from list with colons
- Date: Sun, 25 Aug 2019 03:18:17 +0200
- Authentication-results: amavisd4.gkg.net (amavisd-new); dkim=pass (2048-bit key) header.d=yahoo.co.uk
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s2048; t=1566695901; bh=mA9rBboBruW8NG4Sfx47XX9AZ54XVhttWtFn3osqbGY=; h=From:References:To:Subject:Date:From:Subject; b=lopw0xYl4HBkR4UoURrRfVBt1D2HPj99U7eIuEKTXwCSR/0yuyjI23gJffTSk4VLnN2U1kUFZ+wYaBEQMG/sW7M9zAgdNV/DkTsBnHbZDEDRhxMjsgcoUhINPr3GCxct+YyMx2SktBfQlrsef/fot6LULIwnk8uOMc7hej8VfG6X6ia9jl+FHLkBVQc28Rf9X5H3huC0UYpUWsbBwYg/E1wdWkGbRiKCoOcJZAIyTRBNEg5l0dnCG658Nidtu1V4WY5wB5FitfZWYeel6MRVLbSo5Y0PYeBJKvycyUTV8qiD2bhvUH1Gr+rUCriCKdqW0+yI+wGnjYqlU4QXRbWIpQ==
- In-reply-to: <8e5ab665-a4fb-4c75-a4a4-0a0734148b71@www.fastmail.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- List-unsubscribe: <mailto:zsh-users-unsubscribe@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <qjrbd6$2r3q$1@blaine.gmane.org> <8e5ab665-a4fb-4c75-a4a4-0a0734148b71@www.fastmail.com>
"Daniel Shahaf" wrote:
> 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
> Backslashes:
>
> % _f() { _values desc 'foo\:\:FOO' 'bar\:\:BAR' }
Or don't use _values:
_wanted foos expl foo compadd a::b c::d
Which particular feature of _values do you want? For lists, you can use
_sequence, e.g.:
_wanted foos expl foo _sequence compadd - a::b c::d
and if you want descriptions, _describe might do the job but probably
still needs colons to be quoted. _values is usually not the best choice
when the list of matches are generated somehow.
Oliver
Messages sorted by:
Reverse Date,
Date,
Thread,
Author