-
Notifications
You must be signed in to change notification settings - Fork 3k
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
kernel: Add possibility to disable prompt redrawing #8763
kernel: Add possibility to disable prompt redrawing #8763
Conversation
CT Test Results 3 files 143 suites 1h 31m 13s ⏱️ Results for commit 49ae08a. ♻️ This comment has been updated with latest results. To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass. See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally. Artifacts// Erlang/OTP Github Action Bot |
b2bf54d
to
5dc60f4
Compare
When stdout is used as both a terminal and as the main logging mechanism, redrawing the prompt will cause a lot of ANSI characters to be printed to the log when the prompt is redrawn. So we add this options for systems that have a hard time migrating away. It is only available in Erlang/OTP 26 as a temporary measure as in the long run no system should be using stdout as a logging mechanism and terminal at the same time.
5dc60f4
to
49ae08a
Compare
send_tty(Term2,"my_fun(5) -> ok; my_fun(N) -> timer:sleep(100), io:format(user, \"~p\\n\", [N]), my_fun(N+1).\n"), | ||
send_tty(Term2,"spawn(shell_default, my_fun, [0]). ABC\n"), | ||
timer:sleep(1000), | ||
check_location(Term2, {0,-18}), %% Check that we are at the same location relative to the start. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check_location(Term2, {0,-18}), %% Check that we are at the same location relative to the start. | |
check_location(Term2, {0,-18}), %% Check that the prompt is not redrawn, cursor is at the beginning of the line |
<p>Sets whether the shell should redraw the prompt when it receives output from other processes. | ||
This setting can be useful if you use <c>run_erl</c> to for logging as redrawing the prompt will | ||
emit a lot of ANSI escape characters that you normally do not want in a log. | ||
The default is <c>true</c>.</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The documentation seems somewhat redundant if its only going to be supported in 26. But you should mention that its deprecated / removed in 27?
When stdout is used as both a terminal and as the main logging mechanism, redrawing the prompt will cause a lot of ANSI characters to be printed to the log when the prompt is redrawn. So we add this options for systems that have a hard time migrating away. It is only available in Erlang/OTP 26 as a temporary measure as in the long run no system should be using stdout as a logging mechanism and terminal at the same time.
Supersedes #8644