Skip to content

Commit

Permalink
highlight.sh: BSD compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
bogner committed Oct 11, 2013
1 parent bda95de commit 63767f2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion highlight.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#!/bin/bash
esc=$(echo -e '\033')
color=31
exp=''
while [ $# -gt 0 ] && [ "$1" != "--" ]; do
exp="$exp;"'s/\('"$1"'\)/\o33[1;'"$color"'m\1\o33[0m/g'
exp="$exp;"'s/\('"$1"'\)/'"$esc"'[1;'"$color"'m\1'"$esc"'[0m/g'
color=$(( color + 1 ))
shift
done
Expand Down

0 comments on commit 63767f2

Please sign in to comment.