diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2020-05-05 15:18:23 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2020-05-05 15:18:23 +0200 |
commit | f132d82a796c91fcb741c127f37c963622b4cae4 (patch) | |
tree | 152a835a1810681ef7611a2767dfe2bdc7f2a4db /src/libutil/ansicolor.hh | |
parent | a721a0b1140bf489d645f5d85737acafc1c57c65 (diff) |
nix --help: Group commands
Diffstat (limited to 'src/libutil/ansicolor.hh')
-rw-r--r-- | src/libutil/ansicolor.hh | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/src/libutil/ansicolor.hh b/src/libutil/ansicolor.hh index 390bd4d17..8ae07b092 100644 --- a/src/libutil/ansicolor.hh +++ b/src/libutil/ansicolor.hh @@ -1,13 +1,15 @@ -#pragma once +#pragma once + +namespace nix { + +/* Some ANSI escape sequences. */ +#define ANSI_NORMAL "\e[0m" +#define ANSI_BOLD "\e[1m" +#define ANSI_FAINT "\e[2m" +#define ANSI_ITALIC "\e[3m" +#define ANSI_RED "\e[31;1m" +#define ANSI_GREEN "\e[32;1m" +#define ANSI_YELLOW "\e[33;1m" +#define ANSI_BLUE "\e[34;1m" -namespace nix -{ - /* Some ANSI escape sequences. */ - #define ANSI_NORMAL "\e[0m" - #define ANSI_BOLD "\e[1m" - #define ANSI_FAINT "\e[2m" - #define ANSI_RED "\e[31;1m" - #define ANSI_GREEN "\e[32;1m" - #define ANSI_YELLOW "\e[33;1m" - #define ANSI_BLUE "\e[34;1m" } |