atuin icon indicating copy to clipboard operation
atuin copied to clipboard

Case-Sensitive search

Open norpol opened this issue 2 years ago • 4 comments

Is there a way to make atuin search case-sensitive?

I'm often searching in my history for something that is case dependent, for example searching for ssh*-L will usually show me commands with that specific flag, with atuin I'm currently receiving a command that is ssh host-loop.mydomain.com.

norpol avatar Jun 29 '22 12:06 norpol

It is my impression that atuin is already case sensitive, at least for the last few versions. For example, searching for passcode will return commands containing that word or close matches, but not those containing Passcode. And searching for Passcode will return the one and only command in my history that contain this word.

PS: I came here looking for a way to make it case-insensitive :upside_down_face:

pdecat avatar Nov 22 '22 13:11 pdecat

I just run echo passcode and then echo Passcode and it will show both results when I search for Passcode.

I'm using search_mode = "fulltext" in ~/.config/atuin/config.toml.

Ok, if I remove the search_mode I can't do ssh*-L search anymore, but it becomes case sensitive

image

norpol avatar Nov 22 '22 13:11 norpol

Oh, I'm using fuzzy search mode, that must be it.

pdecat avatar Nov 22 '22 14:11 pdecat

Hmm we could add an option for case sensitivity 🤔

Also omg @norpol that's so much history 🤯

Are you having any performance issues?

ellie avatar Nov 22 '22 14:11 ellie

Hi there, I'd also appreciate having case-sensitive search. I'm using --search mode prefix so, for example, when I search for commands starting with "git" I'd ideally like that just to match git commands but not e.g.

GIT_PAGER=less some-non-git-command

dandavison avatar Jul 16 '23 16:07 dandavison