When i use grep in eshell, like 'cat test.txt | grep test', grep opens it's own buffer with the result. Is it possible to capture the output of grep in the eshell buffer?
grep is a built-in command, which is a lisp function and works like Emacs's
M-x grep. To use the external
grep command, you need to use
*grep instead. If you want to type just
grep , you can declare an alias, i.e.,
~ $ alias grep '*grep $*'
alias here is a built-in command as well, unlike shell's, it creates a persistent alias. If you want to cancel this alias, you have to delete corresponding entry from your
eshell-aliases-file manually. Eshell doesn't provide a
I suggest you consult the Eshell manual, especially (eshell) Built-ins.