I'm trying to create an alias that starts with a pipe.
ex:
echo -i "hello\nworld" | grep world
> world
alias gr="| grep"
echo -i "hello\nworld" gr world
> hello
> world gr world
I.e, if the alias start with a pipe, aliasing doesn't seem to work properly. Is there a way to do this?
zsh
with a "global alias" but get to keep all the pieces when things break.