it's very important to clear screen when debug.
Important? Debug?
It's important not to ruin application output.
And all shells has some sort of cls, clear or even support a hotkey.
Your intentions are not clear.
PuTTY has a way of resetting the terminal. I'm guessing he wants something like that.
Putty/mintty don't provide WinApi access to their consoles. Some info here:
http://conemu.github.io/en/CygwinMsys.html
I'm sorry I didn't express clearly.
It's a useful feature of powercmd, it can simply clear screen by right-click menu (option: clear creen) without type cls command.
Then we can see a cleaner console without interrupt the program.
That is weird and harmful feature! Same as changing cursor to arbitrary position in some "terminals".
Look, if you have an editor (for example Vim or Far manager) and clear the screen on some moment, what will happen? I say, you screen will be currupted!
https://support.microsoft.com/en-us/kb/99261
https://msdn.microsoft.com/en-us/library/windows/desktop/ms682022%28v=vs.85%29.aspx
http://www.codeproject.com/Articles/36382/Clearing-the-Console-Screen-using-API
Basically two choices, use cls or fill the screen with blank characters. The latter could be done *nix-style where the console only pretends to blank where in reality the buffer is not cleared as well.
However, neither of them are adequate methods.
@oldmud0 Do you really think I'm not aware of console API? ;-)
If you read my posts cheerfully, I've never said that ConEmu can't clear screen. But ConEmu must not do that! That is a shell (console applications responsibility)!
It's for @dreamingo88's information, not yours obviously.
I see )
Windows console has a lot of differences in comparison with unix-style.
BTW, have you mentioned how mintty "clears" the screen nowadays? It do the scroll-down just to be sure that printed lines come out of _visible_ area.
Even that method is "improper" because Windows' console applications may write to the whole buffer, but not only visible part of it.
Input “cls” was useful, thx! BTW, it's a amazing tools.
@Maximus5 Actually I find it a useful feature as well for the following reason.
Often I run a command and expect some outcome I want to check at some point, such as a debugging statement or the output of some application and obviously I can simply let the screen roll all output. But if there's a lot of output, I need to scroll a lot and sometimes it is so much even scrolling a little bit is difficult.
There all all kinds of solutions to this, like playing around with find piping, reducing the log buffer, tweaking the application's output or switching to a log tailer or whatever (although with simple cli output this is not trivial). The simplest solution however is to be able to clear the screen with a short-cut. I'm used to the console of IntelliJ which allows you to do that with CTRL-K and I've become addicted to it. It allows me to focus on just the information I need and avoid scrolling pains.
That shortcut for resetting, scrolling back and setting cursor topleft works perfectly to this end. I don't think it was a mistake to add that feature. Thanks for that.
Most helpful comment
@Maximus5 Actually I find it a useful feature as well for the following reason.
Often I run a command and expect some outcome I want to check at some point, such as a debugging statement or the output of some application and obviously I can simply let the screen roll all output. But if there's a lot of output, I need to scroll a lot and sometimes it is so much even scrolling a little bit is difficult.
There all all kinds of solutions to this, like playing around with
findpiping, reducing the log buffer, tweaking the application's output or switching to a log tailer or whatever (although with simple cli output this is not trivial). The simplest solution however is to be able to clear the screen with a short-cut. I'm used to the console of IntelliJ which allows you to do that with CTRL-K and I've become addicted to it. It allows me to focus on just the information I need and avoid scrolling pains.That shortcut for resetting, scrolling back and setting cursor topleft works perfectly to this end. I don't think it was a mistake to add that feature. Thanks for that.