cantino / mcfly

Fly through your shell history. Great Scott!
MIT License
6.75k stars 176 forks source link

feature request - CLI option to dump the sqlite3 db #372

Closed Houlistonm closed 7 months ago

Houlistonm commented 11 months ago

Use case: Go back after a long shell session and extract the commands run to convert to an automated process:

I currently make a copy of my command db, and run commands to find a block of commands that I've run since "yesterday" or some other time range and filter using sql to output to a file.

Feature request: Add a dump option to mcfly to print all cmd from the commands table in chronological ascending order.

Addition arguments:

cantino commented 10 months ago

Cool idea. I'd be open to a PR that adds a command for this.

TD-Sky commented 10 months ago
Houlistonm commented 10 months ago

I'm a fan of epoch seconds or iso-8601 But I'll adapt to the chosen format with --time=$(date -d '1 day ago' '+required_format')

TD-Sky commented 10 months ago

Thanks for your reply! I'm considering adopting systemd.time.

TD-Sky commented 10 months ago

I've got the time parser ready: chrono-systemd-time-ng. I will publish the crate after implementing this request in mcfly with it.


@Houlistonm what is argument --rc?

TD-Sky commented 10 months ago

Please try https://github.com/cantino/mcfly/pull/374, thanks!

cantino commented 7 months ago

374 has been merged and will be released shortly!