[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: readline: How to unbind _all_ keys
From: |
Chet Ramey |
Subject: |
Re: readline: How to unbind _all_ keys |
Date: |
Tue, 21 May 2019 10:16:13 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 |
On 5/21/19 4:04 AM, Henning wrote:
> And another problem: after removing all \C-x sequences I used bind -x
> to bind a shell command to \C-x proper. The result, when hitting \C-x,
> is the following error message:
>
> bash_execute_unix_command: cannot find keymap for command
>
> Using a sequence other than \C-x works as expected.
> My guess is that \C-x can't be used alone. And that this can only be
> changed in the source code.
I can't reproduce this using bash-5.0. I took your script, ran it, then
bound C-x to execute "echo abc":
K=( ' ' ! '\"' \# $ % \& \' \( \) \* + , - . /
0 1 2 3 4 5 6 7 8 9 : \; \< = \> \?
@ A B C D E F G H I J K L M N O
P Q R S T U V W X Y Z \[ '\\' \] ^ _
\` a b c d e f g h i j k l m n o
p q r s t u v w x y z \{ \| \} \~ )
for ((k=0; k<95; k++)); do
bind -r "\C-x\C-${K[k]}"
bind -r "\C-x${K[k]}"
done
# bind -r "\C-x"
bind -x '"\C-x":"echo abc"'
And hitting ^X gives me "abc". It doesn't matter whether or not I remove
the binding for \C-x itself.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/
- readline: How to unbind _all_ keys, Henning, 2019/05/19
- Re: readline: How to unbind _all_ keys, G. Branden Robinson, 2019/05/20
- Re: readline: How to unbind _all_ keys, Chet Ramey, 2019/05/20
- Re: readline: How to unbind _all_ keys, Henning, 2019/05/21
- Re: readline: How to unbind _all_ keys,
Chet Ramey <=
- Re: readline: How to unbind _all_ keys, Henning, 2019/05/22
- Re: readline: How to unbind _all_ keys, Chet Ramey, 2019/05/22
- Re: readline: How to unbind _all_ keys, Henning, 2019/05/24
- Re: readline: How to unbind _all_ keys, Chet Ramey, 2019/05/24
- Re: readline: How to unbind _all_ keys, Henning, 2019/05/25
- previous/next-screen-line (was: readline: How to unbind _all_ keys), Henning, 2019/05/28
- Re: readline: How to unbind _all_ keys, Dennis Williamson, 2019/05/21
- Re: readline: How to unbind _all_ keys, Henning, 2019/05/22
- Re: readline: How to unbind _all_ keys, Koichi Murase, 2019/05/22
- Re: readline: How to unbind _all_ keys, Henning, 2019/05/22