Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: bindkey -s '^[[18~' '^d^c'
- X-seq: zsh-users 18644
- From: Peter Stephenson <p.stephenson@xxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: bindkey -s '^[[18~' '^d^c'
- Date: Thu, 20 Mar 2014 14:35:54 +0000
- In-reply-to: <XnsA2F67D48185A3davidrayninfocouk@80.91.229.13>
- 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
- Organization: Samsung Cambridge Solution Centre
- References: <XnsA2F67D48185A3davidrayninfocouk@80.91.229.13>
On Thu, 20 Mar 2014 12:18:41 +0000 (UTC)
zzapper <david@xxxxxxxxxxxxxx> wrote:
> I want to put ^d^c onto a function key but
>
> bindkey -s '^[[18~' '^d^c'
>
> doesn't work I think because the ^d^c substitute is somehow interpreted.
Yes, the second string is interpreted like the first, so ^d becomes Ctrl
d and ^c becomes Ctrl c. You need to quote them, i.e. you need two
layers of quoting, the one you've got for the comand line, plus another
level for key interpretation.
bindkey -s '^[[18~' '\^d\^c'
The manual does say this if you persist, but there's no pointer from the
entry for the -s option to tell you the information's there.
diff --git a/Doc/Zsh/zle.yo b/Doc/Zsh/zle.yo
index 127b4c4..0cca7bc 100644
--- a/Doc/Zsh/zle.yo
+++ b/Doc/Zsh/zle.yo
@@ -252,6 +252,9 @@ Bind each var(in-string) to each var(out-string).
When var(in-string) is typed, var(out-string) will be
pushed back and treated as input to the line editor.
When tt(-R) is also used, interpret the var(in-string)s as ranges.
+
+Note that both var(in-string) and var(out-string) are subject to the same
+form of interpretation, as described below.
)
item(var(in-string command) ...)(
Bind each var(in-string) to each var(command).
pws
Messages sorted by:
Reverse Date,
Date,
Thread,
Author