-
-
Notifications
You must be signed in to change notification settings - Fork 526
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
Better/more expressive search filters #112
Comments
Sorry, I've taken a while to get to this one. I also hate saying no to all of this because it sounds really fun 😭 Much as queries like you propose sound really cool, I definitely don't want to be adding a DSL (or similar) to Atuin. That's complexity that's totally not needed + I think would cause more issues in the long run. I think most of the current issues we have with lack of expressiveness can be solved via implementing two things
I'd rather keep the keybindings fairly minimal. Something like Ctrl-r to switch between "search global", "search dir", "search session" would be nice. We could have a flag + config for searching with SQL, which can then be overridden per-directory in a similar method as proposed here: #116 (comment). We should also encourage users to add their own keybindings - there's really nothing to stop people from adding another binding to search via some other filter, and arguably that belongs in the shell anyway. 99% of the time I don't think people will be wanting to run particularly advanced queries One of the things I'd like to keep with Atuin is that people don't spend very long in the TUI. It should be quick to open, quick to find what you want, and quick to close - composing queries in it run counter to that. Also... Tantivy is lovely and it would be super cool to include it. It would make it very easy to boost results by directory/session/whatever. However, we currently massively underutilize SQLite and I think we can get the same sorts of behaviour with some smarter search queries |
Currently, it seems that search filters are quite limited. For instance, you can only have 1 optional directory filter. Also, for interactive mode, you cannot update these filters while in the tui.
I think this would ultimately require a large rewrite of the search code.
Current filters:
These all currently only accept up to a single value and they're all duplicated with this conflicting filters.
I'm imagining a system like
atuin search cwd not "$HOME" and time between 2021-04-01 and 2021-05-01
And then there could be a keybinding in the interactive mode to replace the text box with the filter editor.
The text was updated successfully, but these errors were encountered: