akermu/emacs-libvterm

Is there a function that behaves like `vterm-clear`, but deletes the previous lines in the shell as well?

Opened this issue · 3 comments

Is there a function that behaves like vterm-clear, but deletes the previous lines in the shell as well?

This can be useful in case you don't want to confuse the output of one executed shell command with another during an interactive session. This is especially helpful when you're working with a series of long shell outputs. Clearing and deleting ensures that when you move to the beginning of buffer, you're also at the beginning of the output.

I think you want vterm-clear-scrollback, which is bound to C-c C-l by default.

that doesn't have the desired effect.

My bad, you should type C-c C-c C-l. Running M-x vterm-clear-scrollback does nothing on my end too, oddly enough.

but deletes the previous lines in the shell as well?

This time around I'm sure it does!