dotfiles/mariadbcli/.myclirc

140 lines
4.6 KiB
Plaintext
Raw Permalink Normal View History

2018-10-02 21:41:43 +01:00
# vi: ft=dosini
[main]
# Enables context sensitive auto-completion. If this is disabled the all
# possible completions will be listed.
smart_completion = True
# 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
# log_file location.
log_file = ~/.mycli.log
# Default log level. Possible values: "CRITICAL", "ERROR", "WARNING", "INFO"
# and "DEBUG". "NONE" disables logging.
log_level = INFO
# Log every query and its results to a file. Enable this by uncommenting the
# line below.
# audit_log = ~/.mycli-audit.log
# Timing of sql statments and table rendering.
timing = True
# 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, csv.
# Recommended: ascii
table_format = ascii
# 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 http://mycli.net/syntax
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 = vi
# Enabling this option will show the suggestions in a wider menu. Thus more items are suggested.
wider_completion_menu = True
# MySQL prompt
# \D - The full current date
# \d - Database name
# \h - Hostname of the server
# \m - Minutes of the current time
# \n - Newline
# \P - AM/PM
# \p - Port
# \R - The current time, in 24-hour military time (023)
# \r - The current time, standard 12-hour time (112)
# \s - Seconds of the current time
# \t - Product type (Percona, MySQL, MariaDB)
# \u - Username
prompt = "\t \u@\h:\d> "
prompt_continuation = "-> "
# Skip intro info on startup and outro info on exit
less_chatty = False
# 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 = True
# keyword casing preference. Possible values "lower", "upper", "auto"
keyword_casing = auto
# disabled pager on startup
enable_pager = True
# Custom colors for the completion menu, toolbar, etc.
[colors]
# Completion menus.
Token.Menu.Completions.Completion.Current = "bg:ansired ansiwhite bold"
Token.Menu.Completions.Completion = "bg:ansigray ansiwhite"
Token.Menu.Completions.Meta.Current = "bg:ansiyellow ansigray"
Token.Menu.Completions.Meta = "bg:ansigray ansiwhite"
Token.Menu.Completions.MultiColumnMeta = "bg:ansigray ansiwhite"
Token.Menu.Completions.ProgressButton = "bg:ansiblack"
Token.Menu.Completions.ProgressBar = "bg:ansiblue"
Token.SelectedText = "ansiwhite bg:ansiblue"
Token.SearchMatch = "ansiwhite bg:ansiblue"
Token.SearchMatch.Current = "ansiwhite bg:ansired"
Token.Toolbar = "ansiwhite"
Token.Toolbar.Off = "ansigray"
Token.Toolbar.On = "bg:ansiblack ansiwhite"
Token.Toolbar.Search = noinherit bold
Token.Toolbar.Search.Text = nobold
Token.Toolbar.System = noinherit bold
Token.Toolbar.Arg = noinherit bold
Token.Toolbar.Arg.Text = nobold
Token.Toolbar.Transaction.Valid = "bg:ansiblack ansigreen bold"
Token.Toolbar.Transaction.Failed = "bg:ansiblack ansired bold"
# not documented
# see https://github.com/dagwieers/pygments/blob/master/pygments/styles/default.py
Token.Keyword = "ansigreen bold"
Token.String = "ansired"
Token.String.Other = "ansired"
Token.Number = "ansired"
# Favorite queries.
[favorite_queries]
# ADD INDEX
# $1 table name
# $2 index name
ikey = '''ALTER TABLE `$1`
ADD INDEX `IDX_$1_$2` (`$2` ASC)'''
# ADD FOREIGN KEY
# $1 table name
# $2 index name
# $3 refererance table name name
fkey = '''ALTER TABLE `$1`
ADD CONSTRAINT `FK_$1_$2`
FOREIGN KEY (`$2`)
REFERENCES `$3` (`$2`)
ON DELETE NO ACTION
ON UPDATE NO ACTION'''
# Use the -d option to reference a DSN.
[alias_dsn]
# example_dsn = mysql://[user[:password]@][host][:port][/dbname]