I end up typing
grep -Rni pattern .
and awful lot. How do I make this into an alias like
alias gr=\'grep -Rni $@ .\'
Try this:
$ alias gr='grep -Rnif /dev/stdin . <<<' $ gr pattern ./path/file:42: here is the pattern you were looking for
This also works:
$ alias gr='grep -Rnif - . <<<'