atuin
atuin copied to clipboard
skim exact-search modifier has no effect in TUI
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:
- When
search_mode = skim
is on, searching for'wild
in the interactive GUI will search for commands that contain a single quote'
.
I observed:
- This issue is specific to
search_mode = skim
; it works as expected insearch_mode = fuzzy
. - The non-TUI search,
atuin search "'sshfs"
, returns the expected results forsearch_mode = skim
. - On
atuin 14.0.1
.
Screenshot of the issue, showing that atuin search
finds something that the interactive search does not find, when search_mode = skim
is used:
Screenshot showing absence of the issue with search_mode = fuzzy
:
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.
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
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.
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.
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:
-
^git
gives megit diff HEAD^
and other commands that have a literal^
-
git | ls
gives megit config -l | grep alias
and other commands with a literal|
, instead of everything that hasgit
orls
- Previous posts in this issue mention that
'wild
doesn't work either.
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?