0

Tried to assign control n to bind any readline function in bash but can't, e.g:

bind '"\C-n" : previous-history'

but still work as bind -x '"\C-n" : "echo foo"'

Why and how to solve it?

2
  • Try bind '"\C-n": previous-history', without no space before :. This is not an answer because I cannot answer "why?". Commented Sep 15, 2020 at 6:20
  • Shouldn't Ctrl-N be next-history?
    – user313992
    Commented Sep 15, 2020 at 7:17

1 Answer 1

0

As Kamil Maciorowski said Try bind '"\C-n": previous-history'

without any space before :

While it's fine to have space after :

You must log in to answer this question.