Skip to content

Commit db93e46

Browse files
authored
Merge pull request #1865 from dbcli/RW/myclirc-ansi-color-example
Give example for ANSI prompt colors in myclirc
2 parents 43f92f5 + 3be7f9b commit db93e46

3 files changed

Lines changed: 9 additions & 2 deletions

File tree

changelog.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
Upcoming (TBD)
22
==============
33

4+
Documentation
5+
---------
6+
* Give example for ANSI prompt colors in `~/.myclirc`.
7+
8+
49
Internal
510
---------
611
* Remove unused fixture data.

mycli/myclirc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,8 @@ wider_completion_menu = False
136136
# * \n - a newline
137137
# * \_ - a space
138138
# * \\ - a literal backslash
139-
# * \x1b[...m - an ANSI escape sequence (can style with color)
139+
# * \x1b[...m - an ANSI escape sequence (can style with color or attributes)
140+
# ANSI color example: prompt = '\x1b[31mroot\x1b[0m@localhost:\d> '
140141
prompt = '\t \u@\h:\d> '
141142
prompt_continuation = '->'
142143

test/myclirc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,8 @@ wider_completion_menu = False
134134
# * \n - a newline
135135
# * \_ - a space
136136
# * \\ - a literal backslash
137-
# * \x1b[...m - an ANSI escape sequence (can style with color)
137+
# * \x1b[...m - an ANSI escape sequence (can style with color or attributes)
138+
# ANSI color example: prompt = '\x1b[31mroot\x1b[0m@localhost:\d> '
138139
prompt = "\t \u@\h:\d> "
139140
prompt_continuation = ->
140141

0 commit comments

Comments
 (0)