![]() This is also why you can throw signals over an SSH (or other remote shell) session when the terminal emulator itself would have no knowledge of the commands running on the remote host. 3 Erase the scroll-back (aka Saved Lines) Note that this only erases the scroll-back, not the screen. In fact I've tried to do this on a tool I was working on to emulate BSD's SIGINFO in Linux (turned out not to be possible) as as well part of the job control (SIGSTSP et al) support in my $SHELL ( ). ![]() I'd like to perform that exact same 'Clear Scrollback' operation, but from the commandline. I am aware of PuTTY's Clear Scrollback feature, but that requires mouse clicking. However, I can still scroll backwards in PuTTY's GUI to see the old stuff. The following code example uses the Erase in Display sequence that clears the entire screen and does not delete the scrollback buffer. 32 When I connect to my server via PuTTY, I can clear the visible screen with the clear command. If n is 2, clear entire screen (and moves cursor to upper left on DOS ANSI.SYS). First, from man clear, the 'clear scrollback' sequence is Esc3J. ANSI codes include multiple console output sequences with features like moving the cursor up/down, erasing in line, scrolling, and several other options. 2 Answers Sorted by: 59 tl dr The question is about clearing both the screen and the scrollback buffer in the integrated terminal of Visual Studio Code, and the next section addresses that. Sure, theoretically terminal emulators could capture and even rebind those keys via the APIs of whatever graphical toolkit they're built in.but if you wanted to rebind SIGINT to another key in the terminal emulator, that terminal emulator would still have to transmit ^c to the tty.Īs for rebinding those keys in the kernel, Linux simply doesn't support doing that and nor does it support binding other keys to different signals. I dont claim to be any expert at keybindings or terminal escape sequences, but Im trying to muddle through. ![]() Is this possible Update: This is now supported natively in Windows Terminal. ![]() In Linux and UNIX you enable or disable use of ctrl+c (effectively setting the tty into a raw mode) via syscalls against the tty file descriptor - it is not handled by the terminal emulator at all (in fact if you read the man page for `stty` you'd see it's changing the your terminals fd and not the terminal emulator). What I'd like to do is, for example, hit Ctrl + K (like macOS Terminal) to be able to clear the screen properly (similar to issuing a plain clear command) in both WSL and PowerShell. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |