Monday, August 10, 2015

Meta keybindings for bash readline from .inputrc not working


If I put


"\M-p": previous-history

into my .inputrc and fire up a terminal (urxvt or xterm), hitting Alt-p prints a ":" character. Subsequent hits produce ^[p like so:


:^[p^[p^[p^[p^[p

I would like for Alt-p to give me the previous command in history as Control-p does. I have verified that .inputrc is being read by binding previous-history to Control-t, and that worked.


"\C-t": previous-history

I have also tried


Meta-p: previous-history

with no success.


Has anyone else had this issue? Am I doing something wrong?
I'm on Debian sid using xmonad.


Answer



Adding


set convert-meta on

enabled me to set bindings like:


Meta-r: kill-line
Meta-r: kill-line


No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...