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
Mixed comments and snippets in search mode #137
Comments
Thanks for opening your first issue here! In case you're facing a bug, please update navi to the latest version first. Maybe the bug is already solved! :) |
Yeah I agree too that this is very confusing. We already have the preview window so maybe we can have the list show only desc / only command and the preview show the other one (should be configurable imho). |
Actually, it's not displayed randomly. It shows "best" matches in descending order, according to fzf. I'm not sure about displaying only comments or only snippets because many people (myself included) search by both, depending on the use. An option could be added to filter these results, but that would limit the use of the cheatsheets and I believe only a few people would really use it. Any other ideas? |
Ah, one important info: there's no way to hide the snippets and search for them, for example. fzf requires it to be |
One can use the hidden ANSI code to hide some content, but that won't work on most terminal emulators |
Yeah, you have a point there |
Yeah, I'm thinking on something like
|
I believe the width of a given column should be limited otherwise all the other content will become invisible. I'm not sure if we should use magic numbers or make if dependent on the terminal width. |
This way it will become impossible to read the whole comment if it's too big, though |
The preview could always contain 2 lines: one for the comment and another one for the snippet :) |
Last one looks superb. |
I'm about to open a PR so you can test it using another branch 👍 |
@SamuelDSR and @wallace11: could you try the table/refactor branch and give your feedback? |
The branch table/refactor works perfectly in search mode under both mac iterm2/ ubuntu bash [tested]. Thanks very much. @denisidoro |
Cool! The branch introduces new options to customize which columns are shown and so on. I'll probably merge it this week |
Issue Description
Environment
When search a snippet, the comments and commands of all candidate snippet are interleved in a random way.
Please see snapshot below :)
The text was updated successfully, but these errors were encountered: