When running a command like dust > dust.log, the output file will begin with an extremely long line that contains every copy of the progress indicator and control characters for erasing the terminal, such as
^M ^MIndexing: /path/to/dir 6894 files, 5.3G ... -^M ^MIndexing: /path/to/dir 14345 files, 268G ... \
A simple fix for this would be to enable the -P or --no-progress flag by default if dust detects that stdout was redirected to a file, for example using !isatty from libc.
When running a command like
dust > dust.log, the output file will begin with an extremely long line that contains every copy of the progress indicator and control characters for erasing the terminal, such asA simple fix for this would be to enable the
-Por--no-progressflag by default ifdustdetects that stdout was redirected to a file, for example using!isattyfrom libc.