> If you have a shell open and echo "test", then history | grep echo, it will return something like: 891 echo "test".
>
> However, if you issue 16 more unique commands, history | grep echo will no longer be able to find your 891 echo "test" entry.
On zsh, history only returns the last 16 commands, which is the default. But if you type `history 0`, it will return all commands since the zeroth index.
So if I want to search my entire history for instances of a command like this example, I don't modify anything, but just type `history 0 | grep echo` and that does what the author seems to be expecting.
>
> However, if you issue 16 more unique commands, history | grep echo will no longer be able to find your 891 echo "test" entry.
On zsh, history only returns the last 16 commands, which is the default. But if you type `history 0`, it will return all commands since the zeroth index.
So if I want to search my entire history for instances of a command like this example, I don't modify anything, but just type `history 0 | grep echo` and that does what the author seems to be expecting.