File: myclirc

package info (click to toggle)
mycli 1.66.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,276 kB
  • sloc: python: 12,440; makefile: 10
file content (371 lines) | stat: -rw-r--r-- 13,961 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
# vi: ft=dosini
[main]

# Enable or disable the automatic displaying of warnings ("SHOW WARNINGS")
# after executing a SQL statement when applicable.
show_warnings = False

# Enables context sensitive auto-completion. If this is disabled the all
# possible completions will be listed.
smart_completion = True

# Minimum characters typed before offering completion suggestions.
# Suggestion: 3.
min_completion_trigger = 1

# Multi-line mode allows breaking up the sql statements into multiple lines. If
# this is set to True, then the end of the statements must have a semi-colon.
# If this is set to False then sql statements can't be split into multiple
# lines. End of line (return) is considered as the end of the statement.
multi_line = False

# Destructive warning mode will alert you before executing a sql statement
# that may cause harm to the database such as "drop table", "drop database"
# or "shutdown".
destructive_warning = True

# Queries starting with these keywords will activate the destructive warning.
# UPDATE will not activate the warning if the statement includes a WHERE
# clause.
destructive_keywords = DROP SHUTDOWN DELETE TRUNCATE ALTER UPDATE

# interactive query history location.
history_file = ~/.mycli-history

# log_file location.
log_file = ~/.mycli.test.log

# Default log level. Possible values: "CRITICAL", "ERROR", "WARNING", "INFO"
# and "DEBUG". "NONE" disables logging.
log_level = DEBUG

# Log every query and its results to a file. Enable this by uncommenting the
# line below.
# audit_log = ~/.mycli-audit.log

# Timing of sql statements and table rendering.
timing = True

# Show the full SQL when running a favorite query. Set to False to hide.
show_favorite_query = True

# Beep after long-running queries are completed; 0 to disable.
beep_after_seconds = 0

# Table format. Possible values: ascii, double, github,
# psql, plain, simple, grid, fancy_grid, pipe, orgtbl, rst, mediawiki, html,
# latex, latex_booktabs, textile, moinmoin, jira, vertical, tsv, tsv_noheader,
# csv, csv-noheader, jsonl, jsonl_unescaped.
# Recommended: ascii
table_format = ascii

# Redirected otuput format
# Recommended: csv.
redirect_format = csv

# How to display the missing value (ie NULL).  Only certain table formats
# support configuring the missing value.  CSV for example always uses the
# empty string, and JSON formats use native nulls.
null_string = <null>

# How to align numeric data in tabular output: right or left.
numeric_alignment = right

# How to display binary values in tabular output: "hex", or "utf8".  "utf8"
# means attempt to render valid UTF-8 sequences as strings, then fall back
# to hex rendering if not possible.
binary_display = hex

# A command to run after a successful output redirect, with {} to be replaced
# with the escaped filename.  Mac example: echo {} | pbcopy.  Escaping is not
# reliable/safe on Windows.
post_redirect_command = ""

# Syntax coloring style. Possible values (many support the "-dark" suffix):
# manni, igor, xcode, vim, autumn, vs, rrt, native, perldoc, borland, tango, emacs,
# friendly, monokai, paraiso, colorful, murphy, bw, pastie, paraiso, trac, default,
# fruity.
# Screenshots at https://mycli.net/syntax
# Can be further modified in [colors]
syntax_style = default

# Keybindings: Possible values: emacs, vi.
# Emacs mode: Ctrl-A is home, Ctrl-E is end. All emacs keybindings are available in the REPL.
# When Vi mode is enabled you can use modal editing features offered by Vi in the REPL.
key_bindings = emacs

# Enabling this option will show the suggestions in a wider menu. Thus more items are suggested.
wider_completion_menu = False

# MySQL prompt
# * \D - full current date, e.g. Sat Feb 14 15:55:48 2026
# * \R - current hour in 24-hour time (00–23)
# * \r - current hour in 12-hour time (01–12)
# * \m - minutes of the current time
# * \s - seconds of the current time
# * \P - AM/PM
# * \d - selected database/schema
# * \h - hostname of the server
# * \H - shortened hostname of the server
# * \p - connection port
# * \j - connection socket basename
# * \J - full connection socket path
# * \k - connection socket basename OR the port
# * \K - full connection socket path OR the port
# * \T - connection SSL/TLS version
# * \t - database vendor (Percona, MySQL, MariaDB, TiDB)
# * \w - number of warnings, or "(none)" (requires frequent trips to the server)
# * \W - number of warnings, or the empty string  (requires frequent trips to the server)
# * \y - uptime in seconds (requires frequent trips to the server)
# * \Y - uptime in words (requires frequent trips to the server)
# * \u - username
# * \A - DSN alias
# * \n - a newline
# * \_ - a space
# * \\ - a literal backslash
# * \x1b[...m - an ANSI escape sequence (can style with color)
prompt = "\t \u@\h:\d> "
prompt_continuation = ->

# Use the same prompt format strings to construct a status line in the toolbar,
# where \B in the first position refers to the default toolbar showing keystrokes
# and state.  Example:
#
#     toolbar = '\B\d \D'
#
# If \B is included, the additional content will begin on the next line.  More
# lines can be added with \n.  If \B is not included, the customized toolbar
# can be a single line.  An empty value is the same as the default "\B".  The
# special literal value "None" will suppress the toolbar from appearing.
toolbar = ''

# Use the same prompt format strings to construct a terminal tab title.
# The original XTerm docs call this title the "window title", but it now
# probably refers to a terminal tab.  This title is only updated as frequently
# as the database is changed.
terminal_tab_title = ''

# Use the same prompt format strings to construct a terminal window title.
# The original XTerm docs call this title the "icon title", but it now
# probably refers to a terminal window which contains tabs.  This title is
# only updated as frequently as the database is changed.
terminal_window_title = ''

# Use the same prompt format strings to construct a window title in a terminal
# multiplexer.  Currently only tmux is supported.  This title is only updated
# as frequently as the database is changed.
multiplex_window_title = ''

# Use the same prompt format strings to construct a pane title in a terminal
# multiplexer.  Currently only tmux is supported.  This title is only updated
# as frequently as the database is changed.
multiplex_pane_title = ''

# Skip intro info on startup and outro info on exit
less_chatty = True

# Use alias from --login-path instead of host name in prompt
login_path_as_host = False

# Cause result sets to be displayed vertically if they are too wide for the current window,
# and using normal tabular format otherwise. (This applies to statements terminated by ; or \G.)
auto_vertical_output = False

# keyword casing preference. Possible values "lower", "upper", "auto"
keyword_casing = auto

# disabled pager on startup
enable_pager = True

# Choose a specific pager
pager = less

# whether to show verbose warnings about the transition away from reading my.cnf
my_cnf_transition_done = False

# Whether to store and retrieve passwords from the system keyring.
# See the documentation for https://pypi.org/project/keyring/ for your OS.
# Note that the hostname is considered to be different if short or qualified.
# This can be overridden with --use-keyring= at the CLI.
# A password can be reset with --use-keyring=reset at the CLI.
use_keyring = False

[search]

# Whether to apply syntax highlighting to the preview window in fuzzy history
# search.  There is a small performance penalty to enabling this.  The "pygmentize"
# CLI tool must also be available.  The syntax style from the "syntax_style"
# option will be respected, though additional customizations from [colors] will
# not be applied.
highlight_preview = False

[connection]

# character set for connections without --character-set being set
default_character_set = utf8mb4

# whether to enable LOAD DATA LOCAL INFILE for connections without --local-infile being set
default_local_infile = False

# How often to send periodic background pings to the server when input is idle.  Ticks are
# roughly in seconds, but may be faster.  Set to zero to disable.  Suggestion: 300.
default_keepalive_ticks = 0

# Sets the desired behavior for handling secure connections to the database server.
# Possible values:
# auto = SSL is preferred for TCP/IP connections. Will attempt to connect via SSL, but will fall
#        back to cleartext as needed.  Will not attempt to connect with SSL over local sockets.
# on   = SSL is required. Will attempt to connect via SSL even on a local socket, and will fail if
#        a secure connection is not established.
# off  = do not use SSL. Will fail if the server requires a secure connection.
default_ssl_mode = auto

# SSL CA file for connections without --ssl-ca being set
default_ssl_ca =

# SSL CA directory for connections without --ssl-capath being set
default_ssl_capath =

# SSL X509 cert path for connections without --ssl-cert being set
default_ssl_cert =

# SSL X509 key for connections without --ssl-key being set
default_ssl_key =

# SSL cipher to use for connections without --ssl-cipher being set
default_ssl_cipher =

# whether to verify server's "Common Name" in its cert, for connections without
# --ssl-verify-server-cert being set
default_ssl_verify_server_cert = False

[llm]

# If set to a positive integer, truncate text/binary fields to that width
# in bytes when sending sample data, to conserve tokens.  Suggestion: 1024.
prompt_field_truncate = None

# If set to a positive integer, attempt to truncate various sections of LLM
# prompt input to that number in bytes, to conserve tokens.  Suggestion:
# 1000000.
prompt_section_truncate = None

[keys]

# possible values: exit, none
control_d = exit

# possible values: auto, fzf, reverse_isearch
control_r = auto

# comma-separated list: toolkit_default, summon, advancing_summon, prefixing_summon, advance, cancel
#
# * toolkit_default - ignore other behaviors and use prompt_toolkit's default bindings
# * summon - when completions are not visible, summon them
# * advancing_summon - when completions are not visible, summon them _and_ advance in the list
# * prefixing_summon - when completions are not visible, summon them _and_ insert the common prefix
# * advance - when completions are visible, advance in the list
# * cancel - when completions are visible, toggle the list off
control_space = summon, advance

# comma-separated list: toolkit_default, summon, advancing_summon, prefixing_summon, advance, cancel
tab = advancing_summon, advance

# How long to wait for an Escape key sequence in vi mode.
# 0.5 seconds is the prompt_toolkit default, but vi users may find that too long.
# Shorter values mean that "Escape" alone is recognized more quickly.
vi_ttimeoutlen = 0.1

# How long to wait for an Escape key sequence in Emacs mode.
emacs_ttimeoutlen = 0.5

# Custom colors for the completion menu, toolbar, etc, with actual support
# depending on the terminal, and the property being set.
# Colors: #ffffff, bg:#ffffff, border:#ffffff.
# Attributes: (no)blink, bold, dim, hidden, inherit, italic, reverse, strike, underline.
[colors]
completion-menu.completion.current = "bg:#ffffff #000000"
completion-menu.completion = "bg:#008888 #ffffff"
completion-menu.meta.completion.current = "bg:#44aaaa #000000"
completion-menu.meta.completion = "bg:#448888 #ffffff"
completion-menu.multi-column-meta = "bg:#aaffff #000000"
scrollbar.arrow = "bg:#003333"
scrollbar = "bg:#00aaaa"
selected = "#ffffff bg:#6666aa"
search = "#ffffff bg:#4444aa"
search.current = "#ffffff bg:#44aa44"
bottom-toolbar = "bg:#222222 #aaaaaa"
bottom-toolbar.off = "bg:#222222 #888888"
bottom-toolbar.on = "bg:#222222 #ffffff"
search-toolbar = noinherit bold
search-toolbar.text = nobold
system-toolbar = noinherit bold
arg-toolbar = noinherit bold
arg-toolbar.text = nobold
bottom-toolbar.transaction.valid = "bg:#222222 #00ff5f bold"
bottom-toolbar.transaction.failed = "bg:#222222 #ff005f bold"
prompt = ''
continuation = ''

# style classes for colored table output
output.table-separator = ""
output.header = "#00ff5f bold"
output.odd-row = ""
output.even-row = ""
output.null = "#808080"
output.status = ""
output.status.warning-count = ""
output.timing = ""

# SQL syntax highlighting overrides
# sql.comment = 'italic #408080'
# sql.comment.multi-line = ''
# sql.comment.single-line = ''
# sql.comment.optimizer-hint = ''
# sql.escape = 'border:#FF0000'
# sql.keyword = 'bold #008000'
# sql.datatype = 'nobold #B00040'
# sql.literal = ''
# sql.literal.date = ''
# sql.symbol = ''
# sql.quoted-schema-object = ''
# sql.quoted-schema-object.escape = ''
# sql.constant = '#880000'
# sql.function = '#0000FF'
# sql.variable = '#19177C'
# sql.number = '#666666'
# sql.number.binary = ''
# sql.number.float = ''
# sql.number.hex = ''
# sql.number.integer = ''
# sql.operator = '#666666'
# sql.punctuation = ''
# sql.string = '#BA2121'
# sql.string.double-quouted = ''
# sql.string.escape = 'bold #BB6622'
# sql.string.single-quoted = ''
# sql.whitespace = ''

# Favorite queries.
# You can add your favorite queries here. They will be available in the
# REPL when you type `\f` or `\f <query_name>`.
[favorite_queries]
check = 'select "✔"'
foo_args = 'SELECT $1, "$2", "$3"'
# example = "SELECT * FROM example_table WHERE id = 1"

# Initial commands to execute when connecting to any database.
[init-commands]
global_limit = set sql_select_limit=9999
# read_only = "SET SESSION TRANSACTION READ ONLY"


# Use the -d option to reference a DSN.
# Special characters in passwords and other strings can be escaped with URL encoding.
[alias_dsn]
# example_dsn = mysql://[user[:password]@][host][:port][/dbname]

# Initial commands to execute when connecting to a DSN alias.
[alias_dsn.init-commands]
# Define one or more SQL statements per alias (semicolon-separated).
# example_dsn = "SET sql_select_limit=1000; SET time_zone='+00:00'"