atuin icon indicating copy to clipboard operation
atuin copied to clipboard

Feature request: prune history

Open thePanz opened this issue 1 year ago • 2 comments

Thank you for the amazing tool you created!

I am looking for a feature to prune/clear the commands history, like:

  • remove commands executed only one time
  • remove other less frequent commands
  • remove by a regular pattern
  • remove by host or user

Not sure if this is already implemented. any hints?

thePanz avatar Jun 01 '23 06:06 thePanz

Not find an option for prune history. Currently I delete manually use the following sql (I don't need the directory filter, add cwd to the group by section if you need that)

DELETE FROM history
WHERE rowid NOT IN (
    SELECT max(rowid)
    FROM history
    GROUP BY command
);

gary-ruizhang avatar Aug 01 '23 09:08 gary-ruizhang

Not find an option for prune history. Currently I delete manually use the following sql (I don't need the directory filter, add cwd to the group by section if you need that)

DELETE FROM history
WHERE rowid NOT IN (
    SELECT max(rowid)
    FROM history
    GROUP BY command
);

This only clears the local history. Is there a way to also prune the cloud history?

miles170 avatar Jan 29 '24 10:01 miles170