Re: Configuring the MySQL Shell Prompt
Posted by: Wesley Lee
Date: August 27, 2018 02:29PM

My "~/.mysqlsh/prompt.json" file contains the following (copied from the instructions at https://mysql.wisborg.dk/2018/08/02/configuring-the-mysql-shell-prompt/):

I can say, however, that using "[mysql] prompt='SOME_PROMPT_STATEMENT'" in "~/.my.cnf" still works, but I was hoping to colorize the prompt statement using the "prompt.json" file.

{
"segments": [
{
"classes": [
"disconnected%host%",
"%is_production%"
]
},
{
"text": " My",
"bg": 254,
"fg": 23
},
{
"separator": "",
"text": "SQL ",
"bg": 254,
"fg": 166
},
{
"classes": [
"disconnected%host%",
"%ssl%host%session%"
],
"shrink": "truncate_on_dot",
"bg": 237,
"fg": 15,
"weight": 10,
"padding": 1
},
{
"classes": [
"noschema%schema%",
"schema"
],
"bg": 242,
"fg": 15,
"shrink": "ellipsize",
"weight": -1,
"padding": 1
},
{
"classes": [
"%Mode%"
],
"text": "%Mode%",
"padding": 1
}
]
}

Options: ReplyQuote


Subject
Views
Written By
Posted
1290
August 02, 2018 11:03AM
Re: Configuring the MySQL Shell Prompt
410
August 27, 2018 02:29PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.