-
Notifications
You must be signed in to change notification settings - Fork 164
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
fix: columnar_menu create_string with quoted suggestions #886
Conversation
Thanks, it'd be good to have at least a temporary fix for this bug. Could you also modify ide_completions? It has the same problem with For fuzzy completions, you can iterate over the graphemes in every suggestion and highlight every grapheme that contains a character whose index is less than |
@ysthakur Thanks for the reminder! That's interesting, because I was looking at #839 and thought only columnar_menu had the problem, and I also greped It turns out that |
I was hoping for a systematic solution for both issues, I'm not sure if |
LGTM! At some point, I'd like to get rid of the code duplication, but that's for another PR. Nucleo can indeed return the matched indices, it's just going to take a bit of redesigning to include that information in |
That was what in my mind, e.g. 1 more field If specified, do the ansi decoration accordingly. |
@blindFS Yeah, that's what #798 was going to do. However, maxomatic suggested allowing more customizability and suggested a |
I see, I think we are on the exact same page here. Sorry I misunderstood what you're going to do because I just had a glance at the linked function code you gave me earlier and didn't follow the entire stream of #798. IMHO, extra styling options are nice, but if things get complicated, we shouldn't let that subtlety block this important bug fix, right? |
Yup, I have a PR up (#887) for finishing this bug fix for fuzzy matching too. After that panic's fixed, we can work on figuring out adding match indices to Suggestion somehow. |
This is a stopgap for nushell/nushell#12680, nushell/nushell#13951, nushell/nushell#13630, nushell/nushell#15302.
Fuzzy matching will need more care, and I think @ysthakur knows how to fix that.
nushell/nushell#13951 also exposes another bug in
directory_completion
, i.e. not doing quoting, which is handled properly infile_completion
.