New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new feature: clear screen #234

Closed
dreamingo88 opened this Issue Jul 29, 2015 · 13 comments

Comments

Projects
None yet
5 participants
@dreamingo88

dreamingo88 commented Jul 29, 2015

it's very important to clear screen when debug.

@Maximus5

This comment has been minimized.

Show comment
Hide comment
@Maximus5

Maximus5 Jul 29, 2015

Owner

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.

Owner

Maximus5 commented Jul 29, 2015

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.

@oldmud0

This comment has been minimized.

Show comment
Hide comment
@oldmud0

oldmud0 Jul 30, 2015

PuTTY has a way of resetting the terminal. I'm guessing he wants something like that.

oldmud0 commented Jul 30, 2015

PuTTY has a way of resetting the terminal. I'm guessing he wants something like that.

@Maximus5

This comment has been minimized.

Show comment
Hide comment
@Maximus5

Maximus5 Jul 30, 2015

Owner

Putty/mintty don't provide WinApi access to their consoles. Some info here:
http://conemu.github.io/en/CygwinMsys.html

Owner

Maximus5 commented Jul 30, 2015

Putty/mintty don't provide WinApi access to their consoles. Some info here:
http://conemu.github.io/en/CygwinMsys.html

@dreamingo88

This comment has been minimized.

Show comment
Hide comment
@dreamingo88

dreamingo88 Jul 31, 2015

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.

dreamingo88 commented Jul 31, 2015

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.

@Maximus5

This comment has been minimized.

Show comment
Hide comment
@Maximus5

Maximus5 Jul 31, 2015

Owner

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!

Owner

Maximus5 commented Jul 31, 2015

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!

@oldmud0

This comment has been minimized.

Show comment
Hide comment
@oldmud0

oldmud0 Jul 31, 2015

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 commented Jul 31, 2015

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.

@Maximus5

This comment has been minimized.

Show comment
Hide comment
@Maximus5

Maximus5 Jul 31, 2015

Owner

@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)!

Owner

Maximus5 commented Jul 31, 2015

@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)!

@oldmud0

This comment has been minimized.

Show comment
Hide comment
@oldmud0

oldmud0 Jul 31, 2015

It's for @dreamingo88's information, not yours obviously.

oldmud0 commented Jul 31, 2015

It's for @dreamingo88's information, not yours obviously.

@Maximus5

This comment has been minimized.

Show comment
Hide comment
@Maximus5

Maximus5 Jul 31, 2015

Owner

I see )

Windows console has a lot of differences in comparison with unix-style.

Owner

Maximus5 commented Jul 31, 2015

I see )

Windows console has a lot of differences in comparison with unix-style.

@Maximus5

This comment has been minimized.

Show comment
Hide comment
@Maximus5

Maximus5 Jul 31, 2015

Owner

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.

Owner

Maximus5 commented Jul 31, 2015

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.

@Maximus5 Maximus5 closed this Jul 31, 2015

@Maximus5

This comment has been minimized.

Show comment
Hide comment

Maximus5 added a commit that referenced this issue Feb 19, 2016

gh-550, gh-372, gh-234: Unassigned by default hotkey ‘Reset terminal’…
… (dangerous).

  I'm still sure that this operation is harmful and dangerous:
  <https://conemu.github.io/en/ClearScreen.html>.
  But since GuiMacro `Write` exists, anyone may create a macro
  for `Write("\ec")`, which the hotkey actualy executes.

  BTW, with `Write` macro anyone may push to console several colored lines,
  using ANSI sequences, to ‘mark’ some point in real-time logs (tail -f).

    Write "\n\n\e[91m========== '\e]9;8;\"time\"\e\\' ==========\e[m\n\n"
@peteyan

This comment has been minimized.

Show comment
Hide comment
@peteyan

peteyan May 5, 2016

Input “cls” was useful, thx! BTW, it's a amazing tools.

peteyan commented May 5, 2016

Input “cls” was useful, thx! BTW, it's a amazing tools.

@bbottema

This comment has been minimized.

Show comment
Hide comment
@bbottema

bbottema Dec 22, 2016

@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.

bbottema commented Dec 22, 2016

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment