<div dir="ltr">I don't need the line feed from the shell:<div><br></div><div>    echo -ne '\e]0;Hello\a' ; sleep 5</div><div><br></div><div>...works fine.</div><div><br></div><div>But, in terms of line-feed-flushes-buffers, maybe.</div><div><br></div><div>Except that I immediately output something else with a line feed, and the terminal (gnome-terminal, Linux Mint) shows *something* for the escape sequence. It looks almost-correct, but it's hard to tell.</div><div><br></div><div>I suspect something to do with how Erlang has configured the tty for (maybe) raw mode, but I don't understand enough about how that works.<br><div class="gmail_extra"><br><div class="gmail_quote">On 15 May 2017 at 11:17, Alex S. <span dir="ltr"><<a href="mailto:alex0player@gmail.com" target="_blank">alex0player@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word">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><div><blockquote type="cite"><div>12 мая 2017 г., в 22:28, Roger Lipscombe <<a href="mailto:roger@differentpla.net" target="_blank">roger@differentpla.net</a>> написал(а):</div><br class="gmail-m_3970659759307644490Apple-interchange-newline"><div><div><div class="gmail-h5"><div dir="ltr"><div>I have the following:<br></div><div><br></div><div><div>    put_progress(Format, Args) -></div><div>        io:put_chars(user,</div><div>                     [tsl(), io_lib:format(Format, Args), fsl()]),</div><div>        io:put_chars(user,</div><div>                     [colored(), io_lib:format(Format, Args), reset(), "\n"]),</div><div>        ok.</div><div><br></div><div>    tsl() -> "\e]0;".</div><div>    fsl() -> "\a".</div><div>    colored() -> "\e[1;44m".</div><div>    reset() -> "\e[0m".</div></div><div><br></div><div>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" target="_blank">https://serverfault.com/a/<wbr>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><br></div><div>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><br></div><div>So... what's screwing with them when they're output from ct_run?</div><div><br></div><div>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><br></div><div>Cheers,</div><div>Roger.</div></div></div></div>
______________________________<wbr>_________________<br>erlang-questions mailing list<br><a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br><a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/<wbr>listinfo/erlang-questions</a><br></div></blockquote></div><br></div></blockquote></div><br></div></div></div>