When I clear the first time in this terminal, it clears the screen. When I scroll up, there is still a buffer, which is expected. The second time I clear, it doesn't clear the buffer. When I scroll up the buffer is still there. Can anyone help me with that?

I don't want to reset the terminal, I don't think. I just want to clear that buffer on the second clear so I can scroll back up to exactly where I want to.

Edit: I have found the thread that suggests setting the cls alias to 'clear && echo -en "\e[3J"'. That's almost what I'm looking for, but I just want it to clear the buffer up until the last clear. Is that in fact the reset command?

  • That doesn't work. I have tried clear ; clear, clear && clear, and clear – Dalinar42 Jun 6 at 18:16
  • Windows 10 on a Surface Pro 4 – Dalinar42 Jun 6 at 19:18
  • Oh, 1803 17134.81 – Dalinar42 Jun 6 at 19:21

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.