You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sounds like a bug in the script. The nushell maintainers don't really support the scripts here but just the repo. Feel free to submit a fix for it and we could land it.
I think jabdinghoff is right, this is probably a Reedline bug with partial completions. The list menu's unaffected because it doesn't do partial completions, whereas the columnar and IDE menus do. I suspect the problem is in menu_functions::can_partially_complete (also, turns out find_common_string doesn't handle suggestions that are substrings of the first suggestion, not sure if that bug is related though).
I will report this at the nushell repo and depending on that make a pr to fix the regex, i guess?
Both of those would be helpful, but could you report this in the Reedline repo rather than the Nushell one?
Activity
fdncred commentedon Jun 2, 2025
Sounds like a bug in the script. The nushell maintainers don't really support the scripts here but just the repo. Feel free to submit a fix for it and we could land it.
jabdinghoff commentedon Jun 2, 2025
Maybe this is actually a nushell bug?
The script def has a faulty regex
It should be
instead of
nu_scripts/custom-menus/zoxide-menu.nu
Lines 16 to 17 in 765555b
which only gets the last digit from the decimal scores
But what looks like a bug to me:
def __test_menu [] { { name: test_menu only_buffer_difference: true marker: "| " type: { layout: columnar page_size: 3 } style: { text: blue selected_text: blue_reverse description_text: yellow } source: { |buffer, position| [{description: 0, value: "AAAA"}, {description: 1, value: "AAAB"}, {description: 3, value:"AAAC"}] } } }this here similarly selects AAAAAAC, so some kind of common prefix + selected
but the exact same setup with
layout: listworks as expected. Same with the zoxide menu, using list works flawlessly.I will report this at the nushell repo and depending on that make a pr to fix the regex, i guess?
fdncred commentedon Jun 2, 2025
@ysthakur any ideas about this?
ysthakur commentedon Jun 3, 2025
I think jabdinghoff is right, this is probably a Reedline bug with partial completions. The list menu's unaffected because it doesn't do partial completions, whereas the columnar and IDE menus do. I suspect the problem is in
menu_functions::can_partially_complete(also, turns outfind_common_stringdoesn't handle suggestions that are substrings of the first suggestion, not sure if that bug is related though).Both of those would be helpful, but could you report this in the Reedline repo rather than the Nushell one?
zoxide-menu: keep the full score when parsing zoxide output (#1292)