4

I can bounce between apps in Chrome OS by pressing alt-N, where N is the position of my app on the status bar. Useful!

But when I'm in the bash shell of my Nitrous.io box, pressing alt-N to bounce to a different app gives bash a command: (arg: N).

What does the (arg: N) command do in bash? A five minute search taught me plenty of hotkeys, but none with alt + number key.

And can I disable it?

2
  • They are readline arguments. Here are some good explanations.
    – Pablo A
    May 1, 2018 at 18:23
  • For anyone wanting to do this with Crostini, under the keyboard and mouse settings (for Terminal, not the general settings) you can enable the Alt + 1-9 keybinds Aug 11, 2021 at 21:11

1 Answer 1

5

You can remove them in an exactly same way as any other shortcut – with bind -r

for i in "-" {0..9}; do bind -r "\e$i"; done

If you hate loops, you may do it manually:

bind -r '\e-'
bind -r '\e0'
bind -r '\e1'
bind -r '\e2'
bind -r '\e3'
bind -r '\e4'
bind -r '\e5'
bind -r '\e6'
bind -r '\e7'
bind -r '\e8'
bind -r '\e9'

If you do not want this modifiers not only in Bash sessions but everywhere where GNU Readline provides them, add the following lines not in your .bashrc but in your .inputrc:

"\e-"
"\e0"
"\e1"
"\e2"
"\e3"
"\e4"
"\e5"
"\e6"
"\e7"
"\e8"
"\e9"

(Yes, just list them).

2
  • This worked for me in my regular terminal, but for some reason has not worked in guake. I wonder is there some other config that needs or should I report it to the maintainers.
    – M1ke
    Jan 5, 2017 at 10:17
  • This gives me readline: ~/.inputrc: line 1: "\e-": no key sequence terminator, and the same for all of the others. Aug 11, 2021 at 21:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .