Hello. Prompted by fosskers/aura#10 <fosskers/aura#10>, I did a quick analysis of behavior of \b
and \r
in various terminals.
Long story short, @fosskers <https://github.com/fosskers>, author of aura, an AUR helper (and don’t forget I am a developer of one, too!) is using \b
and \r
in his code for doing magic like displaying progress messages in a row. Aura is written in Haskell, but I do not speak Haskell, so I used Python.
Hello world #49 Hello world #99
(Python 3, py2k users should replace , end=''
by ``, `` — note the trailing space)
DESCRIPTION.rst
— this very file.btest-nonl.py
— works, no new lines printed while writing “Hello world #..?”btest-nl.py
— fails, new lines printed while writing “Hello world #..?”testresults.rst
— a list of all results.urxvt-weird-nl.png
— an image of urxvt’s weird behavior.
Testing by Kwpolska, 2012-09-12.