Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: How to capture the tab completion result?
- X-seq: zsh-users 17816
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Mario Signorino <mario.signorino@xxxxxxxxxxx>
- Subject: Re: How to capture the tab completion result?
- Date: Tue, 28 May 2013 01:25:57 -0700
- Cc: Zsh Users <zsh-users@xxxxxxx>
- In-reply-to: <CAM8HBcX0JLHm16uM-5m3jyyApJr_mkxEZX6iUYob0JzP1=7jng@mail.gmail.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>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CAM8HBcV0+VEu6ef1JbAMOChKnD=zprtiEke1=6xTOB-EK1z6TQ@mail.gmail.com> <CAH+w=7ZVzg40or=zXTRDN6QyWVFG+_uQSgh0t=L+oefDHguhzg@mail.gmail.com> <CAM8HBcX0JLHm16uM-5m3jyyApJr_mkxEZX6iUYob0JzP1=7jng@mail.gmail.com>
On Mon, May 27, 2013 at 9:45 AM, Mario Signorino
<mario.signorino@xxxxxxxxxxx> wrote:
>
> zstyle ":completion:*:descriptions" format "\033[H<DESCRIPTION>%d</DESCRIPTION>"
>
> Is it also possible to enable the interpretation of backslash escapes?
Just use the $'...' notation to embed a literal escape in the style:
zstyle ":completion:*:descriptions" format
$'\033[H<DESCRIPTION>%d</DESCRIPTION>'
It's sort of a matter of personal preference whether to write
$'\033'"[H..." (concatenate two sets of quotes) or just wrap the whole
thing in $'...' like I did. Concatenating the double quotes makes it
easier to reference variables, etc., but you can't use $'...' inside
double quotes.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author