summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
b20bfd8)
Firstly, introduce `zgrep' to the ranks of hacked greps. Secondly, run
results of `grep' through a pager.
greplike () {
declare grep=$1; shift
if [ -t 1 ]; then
greplike () {
declare grep=$1; shift
if [ -t 1 ]; then
- command $grep ${GREP_COLORS+--color=auto} "$@"
+ command $grep ${GREP_COLORS+--color=always} "$@" | mdw-pager
else
command $grep "$@"
fi
else
command $grep "$@"
fi
alias grep="greplike grep"
alias egrep="greplike egrep"
alias fgrep="greplike fgrep"
alias grep="greplike grep"
alias egrep="greplike egrep"
alias fgrep="greplike fgrep"
+alias zgrep="greplike fgrep"
# --- Set up some simple aliases ---
# --- Set up some simple aliases ---