atuinsh / atuin

✨ Magical shell history
https://atuin.sh
MIT License
21.3k stars 562 forks source link

skim exact-search modifier has no effect in TUI #1010

Open nh2 opened 1 year ago

nh2 commented 1 year ago

In https://atuin.sh/docs/config/#search_mode it says that search_mode = skim enables skim search syntax.

According to that table, 'wild should do an exact-match search (similar to how exact-match for atuin's own fuzzy search).

But it does not work in the interactive TUI window:

I observed:

Screenshot of the issue, showing that atuin search finds something that the interactive search does not find, when search_mode = skim is used:

image

Screenshot showing absence of the issue with search_mode = fuzzy:

image

So I suspect that when the interactive TUI window is open, the entered string is passed verbatim to skim, instead of treating ' as the exact-match modifier.

conradludgate commented 1 year ago

The table is documentation for the fuzzy search only. For non interactive, we fallback to fuzzy on the skim setting. I'm not sure if we're keeping skim search mode yet, so it's expected to not be 100% good

nh2 commented 1 year ago

The table is documentation for the fuzzy search only

What I'm referring to is that the docs say:

"skim" applies the skim search syntax.

If one clicks that link, one gets skim's own table, which says that 'wild has a specific meaning; so one would expect that meaning to show up.


For non interactive, we fallback to fuzzy on the skim setting.

Ah, so you're saying that for CLI atuin search, skim is not involved at all, not matter what setting. That would be very useful to explain in the docs.

LeoniePhiline commented 1 year ago

For me, with atuin 16.0.0, skim mode also does not work at all. In the TUI, the skim search syntax has no effect on the search results; special chars like ' and ^ are searched verbatim.

injust commented 5 months ago

I'm testing search_mode = "skim" on version 18.3.0. I'm not sure what it's doing, but it doesn't seem to follow the skim search syntax at all:

Unless we're all using it incorrectly, it seems like the skim search mode just...doesn't work.

Given https://forum.atuin.sh/t/is-skim-just-bad/279/8:

One of the biggest issues with Skim is that it cannot work incrementally on our history DB and has to index the whole thing on startup. Due to this, it really is unlikely to see any more development or focus, and is likely to be deprecated soon.

I’d really just suggest that you stick with fuzzy.

Maybe it ought to be deprecated?