Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: prune history #1022

Open
thePanz opened this issue Jun 1, 2023 · 2 comments
Open

Feature request: prune history #1022

thePanz opened this issue Jun 1, 2023 · 2 comments

Comments

@thePanz
Copy link
Contributor

thePanz commented Jun 1, 2023

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?

@gary-ruizhang
Copy link

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
);

@miles170
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants