[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Mysterious error after rebinding keys in Bash 5.1.4

From: Dale Sedivec
Subject: Mysterious error after rebinding keys in Bash 5.1.4
Date: Fri, 16 Apr 2021 00:15:55 -0500

Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: darwin19.6.0
Compiler: /usr/bin/clang
Compilation CFLAGS: -pipe -Os -DSSH_SOURCE_BASHRC 
-isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -arch x86_64
uname output: Darwin dale-work.caliginous.net 19.6.0 Darwin Kernel Version 
19.6.0: Tue Jan 12 22:13:05 PST 2021; root:xnu-6153.141.16~1/RELEASE_X86_64 
Machine Type: x86_64-apple-darwin19.6.0

Bash Version: 5.1
Patch Level: 4
Release Status: release


Rebinding a key seems to break the key that was bound before it.  (That sounds 
bizarre, but read ahead.)


Run the following:

bash --norc --noprofile
bind -m emacs -x '"\C-r": echo one'
bind -m emacs -x '"\C-t": echo two'
bind -m emacs '"\C-t": transpose-chars'

Then press C-r.

Expected behavior: Bash runs "echo one"

Observed behavior: I get an error message and nothing else:

    bash: bash_execute_unix_command: cannot find keymap for command

I believe this worked fine in Bash 5.0.17.

The above is a simplified version of my real use case: I load the key bindings 
that are shipped with the tool fzf[1], but then I want to revert C-t to the 
default behavior, transpose-chars.

And thank you for Bash!


[1]: https://github.com/junegunn/fzf/blob/master/shell/key-bindings.bash

reply via email to

[Prev in Thread] Current Thread [Next in Thread]