Unable to search fish history

Hello,

I recently started using CachyOS and just stumbled upon some strange behavior. Whenever I search for something using history search "*string*" or history search --contains "*string*", according to the fish docs, it always returns the entire history.

Can someone here perhaps help me or explain the behavior?

Regards
m0nKeY

I have never tried to use history search xxx so far, but I can confirm from my side: I can not get it to work either.

BUT I have never heard of it because you can search for previous commands with ctrl +r and then just start typing.
It’s even interactive so you can directly jump to the right command and execute it.

Hope that helps

Also typing the string you are looking for and press arrow up gives you previous commands with that string…hopefully a reasonable alternative?

And you can always pipe the history command into grep to search for something specific :wink:

But I observe the same thing as you and I alas cannot give an explanation for it…

BUT I have never heard of it because you can search for previous commands with ctrl +r and then just start typing.

That helps a lot, thank you. I just started using fish. :slight_smile:

Also typing the string you are looking for and press arrow up gives you previous commands with that string…hopefully a reasonable alternative?

And you can always pipe the history command into grep to search for something specific :wink:

Also very helpful and yes, I was aware of piping into grep. :wink: That’s actually what I have done in the past. :smiley:

Additionally you could type fish_config to open the web interface to configure fish.
It has a “history” tab where you can search for any command in the UI.

1 Like

use builtin history search "*string*" etc

This is not working and the topic of this thread.

That’s quite odd builtin history search "*pacman -Syu*" does work on my side displaying all history relating to pacman update usage.

I don’t use fish, but doesn’t a simple history | grep 'string' work?

grep does also work fine my side without the need for builtin