-
-
Notifications
You must be signed in to change notification settings - Fork 508
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
Add TUI, resolve #19, #17, #16 #21
Conversation
This totally removes the requirement for FZF! Also no longer lists all the database contents and pipes them to something, and instead uses SQLite for searching. Again, SQLite still needs optimizing! We're literally using a LIKE query here, and something like the FTS module would make more sense I think. On top of this, at the moment the TUI is very... "initial implementation". Ie, the code is a mess. It needs restructuring + rethinking, but it works :) I'd like to include more stats in the TUI at some point, without slowing it down too much!
Some(i) => { | ||
if i == 0 { | ||
0 | ||
} else { | ||
i - 1 | ||
} | ||
} | ||
None => 0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some(i) => { | |
if i == 0 { | |
0 | |
} else { | |
i - 1 | |
} | |
} | |
None => 0, | |
None | Some(0) => 0, | |
Some(i) => i - 1, |
if let Some(selected) = app.results_state.selected() { | ||
if selected == i { | ||
content.style = | ||
Style::default().fg(Color::Red).add_modifier(Modifier::BOLD); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if let Some(selected) = app.results_state.selected() { | |
if selected == i { | |
content.style = | |
Style::default().fg(Color::Red).add_modifier(Modifier::BOLD); | |
} | |
} | |
if app.results_state.selected() == Some(i) { | |
content.style = Style::default().fg(Color::Red).add_modifier(Modifier::BOLD); | |
} |
(off topic) @conradludgate how in the world did you approve after the PR was merged...?! 😄 |
You can approve any PR post merge :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really! I can't, and have never been able to, even on repos that I have write access to, e.g. https://github.com/tldr-pages/tldr 🤔
This pull request has been mentioned on Atuin Community. There might be relevant details there: https://forum.atuin.sh/t/question-about-usage-of-stderr-stdout-in-atuin-search-i/66/2 |
This totally removes the requirement for FZF! Also no longer lists all
the database contents and pipes them to something, and instead uses
SQLite for searching. Again, SQLite still needs optimizing! We're
literally using a LIKE query here, and something like the FTS module
would make more sense I think.
On top of this, at the moment the TUI is very... "initial
implementation". Ie, the code is a mess. It needs restructuring +
rethinking, but it works :) I'd like to include more stats in the TUI at
some point, without slowing it down too much!
Also automatically search for whatever the current command buffer is.