You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
reset_clear doesn't show new prompt, left with an empty terminal window until you press enter or hit ctrl+l
To Reproduce
Steps to reproduce the behavior:
Run command to reset and clear terminal (default is ctrl+shift+g)
Expected behavior
Clears the terminal and resets the scroll back while leaving prompt
Desktop:
OS or Linux Distribution: Fedora
Version 37
Display Technology: Wayland
Terminator: 2.1.2
Additional context
If it helps, konsole does what I would expect it to, clears the screen and resets scroll back, but it leaves the prompt at the top of the terminal window
@IvoryJam On my setup, I bound reset_clear to Ctrl+Shift+k (on br-abnt2 keyboard layout, it is easier to type than Ctrl+Shift+g). Then I follow with Ctrl-l.
Note that Ctrl-l is NOT a Terminator's feature, but a shell thing.
Bash is my default shell, so, for me, Ctrl-l is a readline feature. Other shells generally implement something similar. I found this while perusing man bash:
clear-display (M-C-l)
Clear the screen and, if possible, the terminal's scrollback
buffer, then redraw the current line, leaving the current line
at the top of the screen.
clear-screen (C-l)
Clear the screen, then redraw the current line, leaving the cur‐
rent line at the top of the screen. With an argument, refresh
the current line without clearing the screen.
So, instead of doing Ctrl+Shift+k followed by Ctrl-l, I can simply do Ctrl-Alt-l. Note that this shortcut may be already taken by your window manager or desktop environment, which was the case for me: it was used by xflock4 to lock the screen.
It is possible to add a bash shortcut though:
$ bind -x '"\C-l": clear
Or to remap readline we can add something like this to ~/.inputrc:
##
# Clear scrollback and redraw current line.
#
"\C-l": clear-display
I have always been a little put of with “+” vs ”-” syntax to describe shortcuts. It seems Gtk stuff prefers the “+”, while shell-related documentation and configuration seems to prefer ”-”, including vim and emacs. The latter family of tools describe things like C-l rather than C+l or Ctrl+l.
Anyway, this is out of the scope of Terminator itself, but at least related and I learned some stuff researching on this today 🙂.
Activity
mattrose commentedon Jan 22, 2023
This is the way it works with all of the vte-based terminal emulators.
FernandoBasso commentedon Jan 22, 2023
@IvoryJam On my setup, I bound
reset_cleartoCtrl+Shift+k(on br-abnt2 keyboard layout, it is easier to type thanCtrl+Shift+g). Then I follow withCtrl-l.Note that
Ctrl-lis NOT a Terminator's feature, but a shell thing.Bash is my default shell, so, for me,
Ctrl-lis a readline feature. Other shells generally implement something similar. I found this while perusingman bash:So, instead of doing
Ctrl+Shift+kfollowed byCtrl-l, I can simply doCtrl-Alt-l. Note that this shortcut may be already taken by your window manager or desktop environment, which was the case for me: it was used by xflock4 to lock the screen.It is possible to add a bash shortcut though:
Or to remap readline we can add something like this to
~/.inputrc:I have always been a little put of with “+” vs ”-” syntax to describe shortcuts. It seems Gtk stuff prefers the “+”, while shell-related documentation and configuration seems to prefer ”-”, including vim and emacs. The latter family of tools describe things like
C-lrather thanC+lorCtrl+l.Anyway, this is out of the scope of Terminator itself, but at least related and I learned some stuff researching on this today 🙂.