How to clear the command line in Octave?
to clear the command window type:
clc
There are several clearing shortcuts defined:
- Meta-D: clear the next word1
- Ctrl-K: clear to the end of the line
- Ctrl-U: clear the whole line
- Ctrl-L: clear the line and the screen
See more examples in the octave
command-line-editing section of the manual.
For historical reasons Ctrl-U is usually controlled by your terminal rather than octave
, although octave
also supports it. You can test this with stty kill undef
(restore with stty kill '^U'
).
1Meta is often bound to the Win key or the Alt key. If not hit the Esc key first and then the character that needs to be "metaified".