OSDN Git Service
(root)
/
twpd
/
master.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Regular updates
[twpd/master.git]
/
ansi.md
1
---
2
title: Ansi codes
3
category: CLI
4
---
5
6
Format
7
8
\033[#m
9
10
Where:
11
12
0 clear
13
1 bold
14
4 underline
15
5 blink
16
17
30-37 fg color
18
40-47 bg color
19
20
1K clear line (to beginning of line)
21
2K clear line (entire line)
22
2J clear screen
23
0;0H move cursor to 0;0
24
25
1A move up 1 line
26
27
Colors
28
29
0 black
30
1 red
31
2 green
32
3 yellow
33
4 blue
34
5 magenta
35
6 cyan
36
7 white
37
38
Stuff
39
40
hide_cursor() { printf "\e[?25l"; }
41
show_cursor() { printf "\e[?25h"; }