A trick: how to set Ctrl-u to kill-whole-line in Octave command line on Linux

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

A trick: how to set Ctrl-u to kill-whole-line in Octave command line on Linux

roland65
Hi,

in Octave (as in bash), you have to use Ctrl-a + Ctrl-k or End + Ctrl-u to clean the whole command line. This is quite annoying, especially when you are a Matlab user, because in Matlab (as in zsh) you only have to press Ctrl-u to clean the whole command line.

To make Octave behave like Matlab on Linux, the trick is to create a ~/.inputrc file with the following commands:

set bind-tty-special-chars off
"\C-u": kill-whole-line

Then after restarting Octave, you can clean the whole command line using Ctrl-u.

By the way, I don't know how to do this on Windows...