saulpw / visidata

A terminal spreadsheet multitool for discovering and arranging data
http://visidata.org
GNU General Public License v3.0
7.79k stars 276 forks source link

Odd fuzzy matching in command palette #2162

Open reagle opened 9 months ago

reagle commented 9 months ago

I love the command palette! 🙂

Why is it when I type "open" and "open file" open-file is not suggested -- but it is for "file"?

midichef commented 9 months ago

For "open", there are just too many good matches for open-file to be seen. By default, the command palette is set to show at most 10 items. For "file", there are fewer good matches, so open-file ranks high enough for you to see it.

You can allow a longer palette by running vd as vd --disp-cmdpal-max=40, or by putting options.disp_cmdpal_max=40 in your .visidatarc. Then if you search for "open", open-file shows up as item number 36.

reagle commented 9 months ago

@midichef thanks for the tip on showing more options.

Even so, failing to match "open file" to open-file does seem odd to me. Similarly, "fileo" has open-file as the first candidate (good) but "fileop", adding the letter "p", drops open-file from the top 10 candidates while items such as "breakpoint" and "cancel-all" are included.

geekscrapy commented 8 months ago

I would like to see multiple matches (like open) be ordered by their order in history. For example if you used "open-file" a lot, entering "open" would pop "open-file" quite near the top. However, that does make the list more dynamic and therefore unpredictable. This means you'd always need to check the index before selecting.

I prefer predictably though.... For which I have no good solution 😅