mycli icon indicating copy to clipboard operation
mycli copied to clipboard

Inject current date when using www.mycli.net/commands ?

Open HtwoO opened this issue 5 months ago • 1 comments

Is it possible to inject current date/time when using https://www.mycli.net/commands

Concrete example, when exported data to a file:

tableformat csv; \once ~/data.dump.<generated.date>.csv;
select ... from ... where ...;
notee; tableformat ascii;

One would like to inject the current date/time into the filename, either by a SQL query like

select substring(now(), 1, 10);

or by mycli's system command and generate date from date command in the shell like the following

tableformat csv; \once ~/data.dump.$(system date +%F).csv;
...

Maybe it's supported, but not documented in a guide? I can not find an example.

HtwoO avatar Aug 28 '24 03:08 HtwoO