<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">What I’ve noticed is you don’t output the line feed, which might mean that the IO buffer isn’t getting flushed by default. Although I am not sure.<br class=""><div><blockquote type="cite" class=""><div class="">12 мая 2017 г., в 22:28, Roger Lipscombe <<a href="mailto:roger@differentpla.net" class="">roger@differentpla.net</a>> написал(а):</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="">I have the following:<br class=""></div><div class=""><br class=""></div><div class=""><div class=""> put_progress(Format, Args) -></div><div class=""> io:put_chars(user,</div><div class=""> [tsl(), io_lib:format(Format, Args), fsl()]),</div><div class=""> io:put_chars(user,</div><div class=""> [colored(), io_lib:format(Format, Args), reset(), "\n"]),</div><div class=""> ok.</div><div class=""><br class=""></div><div class=""> tsl() -> "\e]0;".</div><div class=""> fsl() -> "\a".</div><div class=""> colored() -> "\e[1;44m".</div><div class=""> reset() -> "\e[0m".</div></div><div class=""><br class=""></div><div class="">That is: output the same message to the title bar (tsl, fsl are the tput capability names; see <a href="https://serverfault.com/a/23998/7027" class="">https://serverfault.com/a/23998/7027</a>), and then (for now) also output it in colour, so that I can see if it's being called correctly.</div><div class=""><br class=""></div><div class="">Unfortunately, something is messing with my tsl() and fsl() escape codes. The coloured text is coming out correctly, but the other stuff's garbage. The escape codes are correct; I've tested them at the bash prompt with "echo -e '\e]0;Hello\a'".</div><div class=""><br class=""></div><div class="">So... what's screwing with them when they're output from ct_run?</div><div class=""><br class=""></div><div class="">Interestingly, if I try the same at the Erlang prompt, it hangs the shell until I press Ctrl+C twice, at which point the text is output, but still messed up.</div><div class=""><br class=""></div><div class="">Cheers,</div><div class="">Roger.</div></div>
_______________________________________________<br class="">erlang-questions mailing list<br class=""><a href="mailto:erlang-questions@erlang.org" class="">erlang-questions@erlang.org</a><br class="">http://erlang.org/mailman/listinfo/erlang-questions<br class=""></div></blockquote></div><br class=""></body></html>