Skip to content

zoxide-menu: keep the full score when parsing zoxide output - #1292

Merged
fdncred merged 1 commit into
nushell:mainfrom
qodelicious:fix-zoxide-menu-score
Oct 20, 2026
Merged

fdncred merged 1 commit into
nushell:mainfrom
qodelicious:fix-zoxide-menu-score

Conversation

@qodelicious

Copy link
Copy Markdown
Contributor

The zoxide menu parses zoxide query -ls with (?P<description>[0-9]+) (?P<value>.+). zoxide prints the score with one decimal ({score:>6.1}), so a line like 12.0 /home/user/projects only matched from the last digit and the description column showed 0 instead of 12.0.

This changes the regex to take the whole score, including the decimal part, and allow any amount of whitespace before the path. Same thing jabdinghoff suggested in #1126.

Checked with a fake zoxide that prints two lines. The menu now shows 12.0 and 4.5 where before it was 0 and 5. toolkit check pr passes.

This doesn't touch the cwd prefix part of #1126, which looks like the reedline partial completion bug discussed there.

@fdncred
fdncred merged commit 8b25ce5 into nushell:main Oct 20, 2026
1 check passed
@fdncred

fdncred commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants