[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Get Terminal to Echo line in buffer on backspace



On Mon, Aug 30, 2021 at 12:26:32PM +0200, Thomas Anderson wrote:
> My issue is: if I am typing to terminal, while receiving data, and I
> backspace -- I just don't know how far I have backspaced, I have to guess.

What you want to do is redraw the current command.  The easiest way to
do this is to press Ctrl-L.  (Or if you're in vi mode, ESC Ctrl-L, and
then you'll need to go back to command mode.)

This clears the whole screen, though.  So if there's information you
need to preserve, take that into account.

Of course, another approach would be to stop doing whatever you're doing
that causes you to "receive data" while you're typing in an interactive
shell.  This might be a workflow issue of some kind.  Maybe you're
running some sort of background job that spews noise.  Maybe you simply
need to redirect that background job's output to a file.  Or maybe you
want to run the noisy background job as a foreground job in a separate
terminal (or a separate "tab", or a separate "virtual terminal" within
screen or tmux, etc.).


Reply to: