Returning the terminal cursor to start
I'm writing a filter (in a pipe destined for a terminal output) that sometimes needs to "overwrite" a line that has just occurred. It works by passing stdin to stdout character-by-character until a n
is reached, and then invoking special behaviour. My problem regards how to return to the beginning of the line.
The first thing I thought of was using a r
or the ANSI sequence