add search history feature #12
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
This is an excellent rofi tool for recoll. But I think it would really benefit having some way of remembering searches. I added a basic search history using the same idea for how it already displays the search results.
It saves the history in a file: ~/.local/share/rofi/rofi_recoll_history
By default it saves the 10 most recent searches, with the most recent listed first.
One minor thing though about my implementation: when making a new search that has a partial match in the search history. For example, if I want to search "fish" and the search history already has an entry for "fisherman", what will be submitted on search is "fisherman". A simple workaround is to enclose it in "double quotes" to treat it as a completely new search term. I'm unsure if there's a better way to address this but it's good enough for my needs.
Thanks for making this really helpful tool. Feel free to make any improvements as my python's really basic.