Nix 2.93.3
Lix: A modern, delicious implementation of the Nix package manager; unstable internal interfaces
Loading...
Searching...
No Matches
terminal.hh
Go to the documentation of this file.
1#pragma once
3
4#include <limits>
5#include <string>
6
7namespace nix {
8
9enum class StandardOutputStream {
10 Stdout = 1,
11 Stderr = 2,
12};
13
27bool isOutputARealTerminal(StandardOutputStream fileno);
28
44bool shouldANSI(StandardOutputStream fileno = StandardOutputStream::Stderr);
45
53std::string filterANSIEscapes(std::string_view s,
54 bool filterAll = false,
55 unsigned int width = std::numeric_limits<unsigned int>::max(),
56 bool eatTabs = true);
57
62void updateWindowSize();
63
70std::pair<unsigned short, unsigned short> getWindowSize();
71
72}