I'd like to pipe a process to less
, and then issue a command to the scroll the end of the current piped text. That is, shift+G blocks if the command hasn't yet closed its stdout, so for a long-running command you can't see the end until it finishes.
As an example:
i=0; while true; i=$((i+1)); do echo $i; sleep 0.001; done | less
If you hit shift+G once less
starts paging, it doesn't scroll down and just blocks indefinitely.
Note that I'm not worried about the buffering - the output is frequent enough that the buffer doesn't cause much delay. Rather, I'd like less not to hang when scrolling to the end of the current buffer (note that it hangs before updating the display, so I do not even see the end of the buffer).
tail
and use [Shift][Up][Down] be a good workaround? – Fabby Nov 14 '19 at 22:33