Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Complete value from list with colons



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



Messages sorted by: Reverse Date, Date, Thread, Author