bat icon indicating copy to clipboard operation
bat copied to clipboard

Use Bat as pager for MySQL

Open ggMartinez opened this issue 10 months ago • 2 comments

Hi guys!

I want to use Bat as a pager for mysql console.

I specify the SQL language, and it kidna works, but it's not accurate. For example, if a cell in a query has a quote character (for example, a name D'Argtanan) it brokes up because there is no closing quote.

Is there any language that works better for mysql?

ggMartinez avatar Feb 18 '25 18:02 ggMartinez

Hi, can you give a more complete example please? Then it might be easier for us to investigate and suggest something 🙂

keith-hall avatar Feb 18 '25 21:02 keith-hall

This sounds to me like OP wants to highlight the ASCII- (or pipe-?) formatted result table output of a SQL query. See screenshot (source).

Once upon a time, I made something similar for a slightly different table format in Vim.

michaelblyons avatar Mar 14 '25 15:03 michaelblyons