Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Completions from file with zcompsys
- X-seq: zsh-users 22739
- From: Dominik Vogt <dominik.vogt@xxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Completions from file with zcompsys
- Date: Tue, 20 Jun 2017 08:46:05 +0100
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mail-followup-to: zsh-users@xxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- Reply-to: dominik.vogt@xxxxxx
Back in the time of compctl there were a lot of hand written
completions in my config, but compsys this has all gone away for
the default completions on the system. Now I need something
special for a hand written command, and the amount of
documentation in the zshcompsys and zshcompwid manpages is
overwhelming. Are there some quick instructions instructions or a
cheat sheet on the new completion system somewhere?
The task at hand is: Some command, say "foo", takes lines from a
certain, pre-written, sorted file as possible completions. (The
lines are actually latin plant names which should not matter.),
e.g.:
-- snip --
...
Chenopodium acuminatum
Chenopodium album
Daucus carota
...
-- snip --
And I want to type things like
$ foo Cheno<TAB>alb<TAB> # -> Chenopodium album
$ foo Che*a<TAB> # -> Chenopodium a
(using menu completion, not expanding the * to all matching
completions). This is probably only one or two lines in the
config.
Ciao
Dominik ^_^ ^_^
--
Dominik Vogt
Messages sorted by:
Reverse Date,
Date,
Thread,
Author