You are not logged in.

#1 2024-03-21 17:22:55

fopdudel
Member
Registered: 2021-02-12
Posts: 10

Anyone know how to clear Zathura history?

When you search for something in a document in Zathura, or you try to run a command with `:`, you can press the up key to scroll through your history of previous commands/searches you've done. Does anyone know how to clear this history? I've searched around and read the zathura and zathurarc manpages but they don't seem to mention a way to clear the history. Or even to just manually delete specific entries would be fine.

Offline

#2 2024-03-22 03:30:33

mpan
Member
Registered: 2012-08-01
Posts: 1,211
Website

Re: Anyone know how to clear Zathura history?

Unless configured to do otherwise, Zathura keeps that in an SQLite database located in “$XDG_DATA_HOME/zathura/bookmarks.sqlite”.

To edit the database: make sure zathura isn’t running and invoke:

sqlite3 ~/.local/share/zathura/bookmarks.sqlite

This is going to start the interactive SQLite shell in which you can issue SQL statements. History table is named “history”.

To see all entries:

select * from "history";

To delete an entry:

delete from "history" where "line" = 'showMeCatPictures';

To delete all entries:

delete from "history";

Other useful commands: `.exit`quits the interactive shell, `.help` shows shell’s commands, `.tables` lists tables, `.schema TABLENAME` shows TABLENAME’s schema.

Relevant docs: delete, select.

Last edited by mpan (2024-03-22 03:33:36)


Sometimes I seem a bit harsh — don’t get offended too easily!

Offline

Board footer

Powered by FluxBB