|
\a : an ASCII character
|
|
\d : the date in “Weekday Month Date” format
|
|
\D{format} : the format is passed to strftime(3) and the result is inserted into the prompt string; an empty format results in a locale-specific time representation. The braces are required
|
|
\e : an ASCII escape character
|
|
\h : the hostname up to the first '.'
|
|
\H : the hostname
|
|
\j : the number of jobs currently managed by the shell
|
|
\l : the basename of the shell's terminal device name
|
|
\n : a new line
|
|
\r : a carriage return
|
|
\s : the name of the shell, the basename of $0 (the portion following the final slash)
|
|
\t : the current time in 24-hour HH:MM:SS format
|
|
\T : the current time in 12-hour HH:MM:SS format
|
|
\@ : the current time in 12-hour am/pm format
|
|
\A : the current time in 24-hour HH:MM format
|
|
\u : the username of the current user
|
|
\v : the version of bash
|
|
\V : the release of bash, version + patch level (e.g., 2.00.0)
|
|
\w : the current working directory, with $HOME abbreviated with ~
|
|
\W : the basename of the current working directory, with $HOME abbreviated with ~
|
|
\! : the history number of the last command
|
|
\# : the command number of the last command
|
|
\$ : if the effective UID is 0, a #, otherwise a $
|
|
\nnn : the character corresponding to the octal number nnn
|
|
\\ : a backslash
|
|
\[ : begin a sequence of non-printing characters, which could be used to embed a terminal control sequence into the prompt
|
|
\] : end a sequence of non-printing characters
|
|
everything else in terpreted literraly
|
|
\e[codem : indicate the start of a formating
|
|
\e[m : indicate the end of all formating
|
|
code : set;colour;background
|
|
SET
|
RESET
|
FOREGROUND
|
BACKGROUND
|
|
1 : bold/bright
|
0 : reset all
|
30 : black
|
40 : black
|
|
2 : dim
|
1 : reset bold/bright
|
31 : red
|
41 : red
|
|
4 : underlined
|
2 : reset dim
|
32 : green
|
42 : green
|
|
5 : blink
|
24 : reset underlined
|
33 : yellow
|
43 : yellow
|
|
7 : reverse
|
25 : reset blink
|
34 : blue
|
44 : blue
|
|
8 : hidden
|
27 : reset reverse
|
35 : magenta
|
45 : magenta
|
|
28 : reset hidden
|
36 : cyan
|
46 : cyan
|
|
|
37 : light gray
|
47 : light gray
|
||
|
39 : default
|
49 : defautl
|
||
|
90 : dark gray
|
100 : dark gray
|
||
|
91 : light red
|
101 : light red
|
||
|
92 : light green
|
102 : light green
|
||
|
93: light rellow
|
103 : light yellow
|
||
|
94 : light blue
|
104 : light blue
|
||
|
95: light magenta
|
105 : light magenta
|
||
|
96 : light cyan
|
106 : light cyan
|
||
|
97 : white
|
107 : white
|
No comments yet.
Cheatography n. The art of mapping complex subjects into clear, instantly navigable reference guides.