3 # Purpose: highlight grep
4 # Authors: Oliver Kiddle (<URL:http://www.zsh.org/mla/workers/2001/msg00390.html>)
5 # Bug-Reports: see http://grml.org/bugs/
6 # License: This file is licensed under the GPL v2.
7 # Latest change: Sam Mai 27 15:12:27 CEST 2006 [mika]
8 ################################################################################
11 echo "Usage: $0:t [-e pattern...] [file...]" >&2
16 local htext=`echotc so` ntext=`echotc se`
18 while [[ "$1" = -e ]]; do
23 if (( ! $#regex )); then
29 s/${^regex[@]}/$htext&$ntext/g" )
30 sed ${(Ff)regex[@]} "$@"
32 ## END OF FILE #################################################################