Zsh Mailing List Archive
Messages sorted by:
Custom auto complete
- X-seq: zsh-workers 32943
- From: Domagoj Pintaric <domagoj.pintaric@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Custom auto complete
- Date: Sun, 3 Aug 2014 18:17:51 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=PRAPKBjrAUXieuFrknF9sZXsFYKRS5xSF40ecPqj6zU=; b=AM/wOA2ZvYhtkOLxOo855TeO/QJqw6t+CR9okmTqLxYcPFaN4OwCHZdXFCoTJ7WC+5 It5uh6+DKqhKDVcPv0NgOXHUvudkAdLuql0htRPqNMebzk5sGwe+k4JtqEseLngnmUTS J63DYfmOZb+7VVttw3+I/UbHAHAoRKLHNlT7u3WzZB5+7EGq1yoEIOxgwXAwyDiKfHNd Rkc3AYOJ6zlD5YzBIh/N3GdgX/8/RGT4VMcazU1XBKqdyc++nnTn+dsdDarq5V1q8reY KN1970pCFn8rirc9tnKO9nUnGCHnZ9Vl2fhS/Rc+CuSUEMF2DShIW4ONUgGYVgDdIDvf ysuw==
- List-help: <mailto:firstname.lastname@example.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:email@example.com>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
I wold like to write my own zsh auto complete function/code but i need some
reference to start with. This is is what i want to do:
I wold like to parse the command that is currently typed and if there is a
"?" char followed by a <TAB> key press to show a menu of options to
compete. So for example if I start typing:
> cp ?<TAB>
i would like zsh to shows me a menu of strings to replace the "?" char
with. Options would also have to be numerated so it would possible to write:
The strings I would like to be displayed would be stored in a file.
If found some tutorials on how to write my own auto complete functions but
the problem is I want this to work anywhere in the command string that is
currently typed not just if i start with that command.
I understand that the "?" char might have to be escaped or something but
it's not important that the "trigger" char is "?" it can be something else.
So my question is how do i get zsh to display a custom auto complete menu
when I press <TAB> and the previous char is, for example, "?".
Messages sorted by: