diff options
author | Jade Lovelace <lix@jade.fyi> | 2024-07-31 22:06:18 -0700 |
---|---|---|
committer | Jade Lovelace <lix@jade.fyi> | 2024-08-04 20:41:19 -0700 |
commit | 5f0ef50077002f0308fc45f7d0a01a508c970516 (patch) | |
tree | a0aecc6edf4298d0f168da350eccab2cbb716391 /src/libutil/terminal.hh | |
parent | 378ec5fb0611e314511a7afc806664205846fc2e (diff) |
cli: eat terminal codes from stdout also
This *should* be sound, plus or minus the amount that the terminal code
eating code is messed up already.
This is useful for testing CLI output because it will strip the escapes
enough to just shove the expected output in a file.
Change-Id: I8a9b58fafb918466ac76e9ab585fc32fb9294819
Diffstat (limited to 'src/libutil/terminal.hh')
-rw-r--r-- | src/libutil/terminal.hh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libutil/terminal.hh b/src/libutil/terminal.hh index 6b8d59182..2c422ecff 100644 --- a/src/libutil/terminal.hh +++ b/src/libutil/terminal.hh @@ -30,7 +30,8 @@ bool shouldANSI(); */ std::string filterANSIEscapes(std::string_view s, bool filterAll = false, - unsigned int width = std::numeric_limits<unsigned int>::max()); + unsigned int width = std::numeric_limits<unsigned int>::max(), + bool eatTabs = true); /** * Recalculate the window size, updating a global variable. Used in the |