[erlang-patches] Support ANSI in the console

Björn-Egil Dahlberg <>
Thu Jan 10 18:44:52 CET 2013


Merged to master as-is.
Closing issue.

// Björn-Egil
On 2013-01-09 17:38, Björn-Egil Dahlberg wrote:
> I have placed this patch into opu - i.e. a final integration test 
> through our daily builds.
>
> I've reconsidered its impact. It should not have any impact if you 
> don't use control sequences, which probably is the case in legacy code 
> since those were filtered anyways. I also agree that not resetting the 
> console is a user error.
>
> An easy way to reset the console if problems arise might be a nice 
> future addition though.
>
> Your patch will probably be merged later this week if it passes final 
> integration, shouldn't be a problem though.
>
> // Björn-Egil
>
> 2012/12/18 Pedram Nimreezi < 
> <mailto:>>
>
>     Yes that was intentionally omitted, as a small percentage of the time
>     it affected the ( ) brace matching (in smaller terminals)..
>     Also not properly resetting ANSI colors once a color is set is
>     technically a user error.
>     Would agree always resetting is the way to go, if it doesn't affect
>     anything else.
>
>     On Tue, Dec 18, 2012 at 9:36 AM, Björn-Egil Dahlberg
>     <
>     <mailto:>> wrote:
>     > This seems nice.
>     >
>     > I use colors directly in the bash shell normally. Also via
>     Erlang. Could be
>     > nice with colors in erlang shell also. Seems more modern =)
>     >
>     > Is:
>     > --- a/lib/stdlib/src/shell.erl 2011-11-22 08:57:01.000000000 -0500
>     > +++ b/lib/stdlib/src/shell.erl 2011-12-10 14:25:58.000000000 -0500
>     > @@ -674,6 +674,7 @@ exprs([E0|Es], Bs1, RT, Lf, Ef, Bs0, W)
>     >                      [io:requests([{put_chars, VS}, nl]) || W
>     =:= cmd],
>     >                      %% Don't send the result back if it will be
>     >                      %% discarded anyway.
>     > +                    io:fwrite("\e[0m"),
>     >                      V = if
>     >                              W =:= pmt ->
>     >                                  {W,V0};
>     >
>     > intentionally omitted?
>     > Always clearing the shell might be the way to go =)
>     >
>     > // Björn-Egil
>     >
>     > 2012/11/22 Henrik Nord <
>     <mailto:>>
>     >>
>     >> This mailing list + github is the only way atm.
>     >>
>     >> We are considering letting a view of our daily build result
>     page show up
>     >> to the public via erlang.org <http://erlang.org>
>     >> That would increase transparency and possible decrease the
>     turnaround time
>     >> for patches as the authors themselves could check the test
>     results of their
>     >> patches.
>     >>
>     >>
>     >> On 2012-11-22 10:11, Yurii Rashkovskii wrote:
>     >>
>     >> Is there any *reliable* way to track what's in pu/master-pu?
>     >>
>     >>
>     >> On Thu, Nov 22, 2012 at 1:07 AM, Henrik Nord <
>     <mailto:>> wrote:
>     >>>
>     >>> No its in there, it was just removed temporary from the push
>     >>>
>     >>>
>     >>>
>     >>> On 2012-11-21 19:01, Yurii Rashkovskii wrote:
>     >>>
>     >>> Forgive me if I am missing something, but did this patch
>     somehow not make
>     >>> it to master-pu?
>     >>>
>     >>>
>     >>>
>     https://github.com/erlang/otp/blob/master-pu/erts/emulator/drivers/unix/ttsl_drv.c#L915
>     >>>
>     >>> (pu doesn't have it either
>     >>>
>     https://github.com/erlang/otp/blob/pu/erts/emulator/drivers/unix/ttsl_drv.c#L915)
>     >>>
>     >>> Is it intentional or is it an omission?
>     >>>
>     >>>
>     >>> On Thu, Nov 15, 2012 at 4:20 AM, Henrik Nord
>     < <mailto:>> wrote:
>     >>>>
>     >>>> Thank you for your contribution, I have added the patch to
>     'master-pu'
>     >>>>
>     >>>>
>     >>>>
>     >>>> On 2012-11-14 14:49, Pedram Nimreezi wrote:
>     >>>>>
>     >>>>>
>     >>>>>
>     https://github.com/DeadZen/otp/blob/d3e3d51dbb21f0fdb125becacb80e34d0565fff7/erts/emulator/drivers/unix/ttsl_drv.c#L901
>     >>>>>
>     >>>>>
>     https://github.com/DeadZen/otp/blob/d3e3d51dbb21f0fdb125becacb80e34d0565fff7/erts/emulator/drivers/unix/ttsl_drv.c#L599
>     >>>>>
>     >>>>>
>     https://github.com/DeadZen/otp/blob/d3e3d51dbb21f0fdb125becacb80e34d0565fff7/erts/emulator/drivers/unix/ttsl_drv.c#L609
>     >>>>
>     >>>>
>     >>>> --
>     >>>> /Henrik Nord Erlang/OTP
>     >>>>
>     >>>>
>     >>>> _______________________________________________
>     >>>> erlang-patches mailing list
>     >>>>  <mailto:>
>     >>>> http://erlang.org/mailman/listinfo/erlang-patches
>     >>>
>     >>>
>     >>>
>     >>> --
>     >>> /Henrik Nord Erlang/OTP
>     >>
>     >>
>     >>
>     >> --
>     >> /Henrik Nord Erlang/OTP
>     >>
>     >>
>     >> _______________________________________________
>     >> erlang-patches mailing list
>     >>  <mailto:>
>     >> http://erlang.org/mailman/listinfo/erlang-patches
>     >>
>     >
>     >
>     > _______________________________________________
>     > erlang-patches mailing list
>     >  <mailto:>
>     > http://erlang.org/mailman/listinfo/erlang-patches
>     >
>
>
>
>     --
>     /* Sincerely
>     --------------------------------------------------------------
>     Pedram Nimreezi - Chief Technology Officer  */
>
>     // The hardest part of design ... is keeping features out. -
>     Donald Norman
>
>
>
>
> _______________________________________________
> erlang-patches mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-patches

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-patches/attachments/20130110/417bc102/attachment.html>


More information about the erlang-patches mailing list