Open zer09 opened 3 years ago
From my experience, there is no way to set the pager in .my.cnf
(or any other mysql config file) that will work with all of: mysql (cli), mysldump, and mycli.
See #881 - what really needs to be done is to support this in .myclirc
What I've been doing is just manually setting it every time I start mycli like this:
> pager pspg
I have a similar issue, and I worked around that for now using --defaults-group-suffix
.
My ~/.my.cnf
looks like this now:
[client]
user = lorem
[client_visidata]
pager = vd --filetype=tsv
[mysql_visidata]
silent
raw
By default, e.g. mysqldump
will just see the [client]
section.
In my shell, I have a wrapper script (or it could be an alias) that appends --defaults-group-suffix='_visidata'
:
$ mysql --defaults-group-suffix='_visidata' # ...
$ mycli --defaults-group-suffix='_visidata' # ...
That basically makes mysqli
and mycli
see both contents of [client]
and [client_visidata]
as a single merged [client]
group.
And same happens for other configuration groups.
@UrGuardian4ngel WOW! thank you, this works great. Exactly what I needed.
I tried this on my
.my.cnf
But
mysqldump
doesn't like it.