The return of Atuin history seems strange to me.
It does not return the expected result and many other lines that do not contain the informed expression.
Atuin v18.5.0 on Mac with zsh
Example:
0s 22d ago echo [...]
0s 1mo ago echo [...]
0s 3mo ago mkdir -p ~/.ssh\^J\^Jtouch ~/.ssh/authorized_keys\^J\^JRSA_KEY=[...]
0s 4mo ago echo [...]
13ms 12m ago echo [...]
0s 4mo ago [...]
0s 24d ago git clone -c http.extraHeader='Authorization: Bearer [...]
0s 4mo ago echo [...]
0s 4mo ago echo [...]
0s 2mo ago 1638 echo [...]
0s 29d ago echo [...]
0s 24d ago git clone [...]
0s 3d ago kubectl --token=[...]
0s 3d ago curl -H "Bearer [...]
0s 24d ago git clone [...] -vvv
0s 24d ago git clone [...]
0s 4mo ago oc login --token=[...]
0s 4mo ago oc login --token=[...]
9 0s 22m ago echo [...]
8 0s 1d ago brew install lazygit
7 0s 1d ago lazygit
6 0s 4h ago history| grep lazy
5 0s 4h ago history | grep lazy -s
4 0s 3h ago history | grep lazy -i
3 0s 48m ago HSTR_CONFIG=hicolor,raw-history-view,help-on-opposite-side,duplicates hstr lazy
2 0s 16m ago atuin search --limit 1 lazy
1 0s 16m ago atuin search -i --limit 1 lazy
> 0s 2m ago history | grep -i lazy
[ GLOBAL ] lazygit
History:
5139 git clone https://github.com/LazyVim/starter ~/.config/nvim
8459 brew install lazygit
8460 lazygit
8466 lazygit
8533 history| grep lazy
8535 history | grep lazy -s
8536 history | grep lazy -i
8538 history | grep lazy -i
8540 history | grep lazy -i
8678 HSTR_CONFIG=hicolor,raw-history-view,help-on-opposite-side,duplicates hstr lazy
8679 history | grep -i lazy
8699 history | grep -i lazy
8701 atuin search --limit 1 lazy
8702 atuin search -i --limit 1 lazy