]> arthur.barton.de Git - bup.git/blob - Documentation/bup-newliner.md
wvtest: set a very large timeout to disable test time colors
[bup.git] / Documentation / bup-newliner.md
1 % bup-newliner(1) Bup %BUP_VERSION%
2 % Avery Pennarun <apenwarr@gmail.com>
3 % %BUP_DATE%
4
5 # NAME
6
7 bup-newliner - make sure progress messages don't overlap with output
8
9 # SYNOPSIS
10
11 \<any command\> 2>&1 | bup newliner
12
13 # DESCRIPTION
14
15 `bup newliner` is run automatically by bup.  You shouldn't
16 need it unless you're using it in some other program.
17
18 Progress messages emitted by bup (and some other tools) are
19 of the form "Message ### content\\r", that is, a status
20 message containing a variable-length number, followed by a
21 carriage return character and no newline.  If these
22 messages are printed more than once, they overwrite each
23 other, so what the user sees is a single line with a
24 continually-updating number.
25
26 This works fine until some other message is printed.  For
27 example, progress messages are usually printed to stderr,
28 but other program messages might be printed to stdout.  If
29 those messages are shorter than the progress message line,
30 the screen will be left with weird looking artifacts as the
31 two messages get mixed together.
32
33 `bup newliner` prints extra space characters at the right
34 time to make sure that doesn't happen.
35
36 If you're running a program that has problems with these
37 artifacts, you can usually fix them by piping its stdout
38 *and* its stderr through bup newliner.
39
40 # BUP
41
42 Part of the `bup`(1) suite.