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 ################################################################################
10 echo "Usage: $0:t [-e pattern...] [file...]" >&2
15 local htext=`echotc so` ntext=`echotc se`
17 while [[ "$1" = -e ]]; do
22 if (( ! $#regex )); then
28 s/${^regex[@]}/$htext&$ntext/g" )
29 sed ${(Ff)regex[@]} "$@"
31 ## END OF FILE #################################################################