|
11 | 11 | */ |
12 | 12 | final class TtyControlSequence extends Dictionary |
13 | 13 | { |
14 | | - public const BLACK = "\x1b[30m"; |
15 | | - public const RED = "\x1b[31m"; |
16 | | - public const GREEN = "\x1b[32m"; |
17 | | - public const YELLOW = "\x1b[33m"; |
18 | | - public const BLUE = "\x1b[34m"; |
19 | | - public const MAGENTA = "\x1b[35m"; |
20 | | - public const CYAN = "\x1b[36m"; |
21 | | - public const WHITE = "\x1b[37m"; |
22 | | - public const DEFAULT = "\x1b[39m"; |
23 | | - public const BLACK_BG = "\x1b[40m"; |
24 | | - public const RED_BG = "\x1b[41m"; |
25 | | - public const GREEN_BG = "\x1b[42m"; |
26 | | - public const YELLOW_BG = "\x1b[43m"; |
27 | | - public const BLUE_BG = "\x1b[44m"; |
28 | | - public const MAGENTA_BG = "\x1b[45m"; |
29 | | - public const CYAN_BG = "\x1b[46m"; |
30 | | - public const WHITE_BG = "\x1b[47m"; |
31 | | - public const DEFAULT_BG = "\x1b[49m"; |
32 | | - public const BOLD = "\x1b[1m"; |
33 | | - public const DIM = "\x1b[2m"; |
34 | | - public const UNDERLINE = "\x1b[4m"; |
35 | | - public const NO_UNDERLINE = "\x1b[24m"; |
| 14 | + public const BLACK = "\e[30m"; |
| 15 | + public const RED = "\e[31m"; |
| 16 | + public const GREEN = "\e[32m"; |
| 17 | + public const YELLOW = "\e[33m"; |
| 18 | + public const BLUE = "\e[34m"; |
| 19 | + public const MAGENTA = "\e[35m"; |
| 20 | + public const CYAN = "\e[36m"; |
| 21 | + public const WHITE = "\e[37m"; |
| 22 | + public const DEFAULT = "\e[39m"; |
| 23 | + public const BLACK_BG = "\e[40m"; |
| 24 | + public const RED_BG = "\e[41m"; |
| 25 | + public const GREEN_BG = "\e[42m"; |
| 26 | + public const YELLOW_BG = "\e[43m"; |
| 27 | + public const BLUE_BG = "\e[44m"; |
| 28 | + public const MAGENTA_BG = "\e[45m"; |
| 29 | + public const CYAN_BG = "\e[46m"; |
| 30 | + public const WHITE_BG = "\e[47m"; |
| 31 | + public const DEFAULT_BG = "\e[49m"; |
| 32 | + public const BOLD = "\e[1m"; |
| 33 | + public const DIM = "\e[2m"; |
| 34 | + public const UNDERLINE = "\e[4m"; |
| 35 | + public const NO_UNDERLINE = "\e[24m"; |
36 | 36 |
|
37 | 37 | /** |
38 | 38 | * Reset BOLD and DIM |
39 | 39 | * |
40 | 40 | * @see TtyControlSequence::UNBOLD_DIM |
41 | 41 | * @see TtyControlSequence::UNDIM_BOLD |
42 | 42 | */ |
43 | | - public const UNBOLD_UNDIM = "\x1b[22m"; |
| 43 | + public const UNBOLD_UNDIM = "\e[22m"; |
44 | 44 |
|
45 | 45 | /** |
46 | 46 | * Reset BOLD, set DIM |
47 | 47 | * |
48 | 48 | */ |
49 | | - public const UNBOLD_DIM = "\x1b[22;2m"; |
| 49 | + public const UNBOLD_DIM = "\e[22;2m"; |
50 | 50 |
|
51 | 51 | /** |
52 | 52 | * Reset DIM, set BOLD |
53 | 53 | * |
54 | 54 | */ |
55 | | - public const UNDIM_BOLD = "\x1b[22;1m"; |
| 55 | + public const UNDIM_BOLD = "\e[22;1m"; |
56 | 56 |
|
57 | 57 | /** |
58 | 58 | * Reset all colours and styles |
59 | 59 | * |
60 | 60 | */ |
61 | | - public const RESET = "\x1b[m"; |
| 61 | + public const RESET = "\e[m"; |
62 | 62 |
|
63 | 63 | /** |
64 | 64 | * Clear to end of line |
65 | 65 | * |
66 | 66 | */ |
67 | | - public const CLEAR_LINE = "\x1b[K"; |
| 67 | + public const CLEAR_LINE = "\e[K"; |
68 | 68 |
|
69 | 69 | /** |
70 | 70 | * Turn off automatic margins |
71 | 71 | * |
72 | 72 | */ |
73 | | - public const WRAP_OFF = "\x1b[?7l"; |
| 73 | + public const WRAP_OFF = "\e[?7l"; |
74 | 74 |
|
75 | 75 | /** |
76 | 76 | * Turn on automatic margins |
77 | 77 | * |
78 | 78 | */ |
79 | | - public const WRAP_ON = "\x1b[?7h"; |
| 79 | + public const WRAP_ON = "\e[?7h"; |
80 | 80 | } |
0 commit comments