From: Nicolas Boisselier Date: Tue, 28 Jul 2015 18:53:34 +0000 (+0100) Subject: hl X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=71ec478db65b889f32d04872b1be358ab0907b7b;p=nb.git hl --- diff --git a/etc/profile.d/0default.sh b/etc/profile.d/0default.sh index 03811450..5a9fe88e 100644 --- a/etc/profile.d/0default.sh +++ b/etc/profile.d/0default.sh @@ -45,3 +45,8 @@ getexp() { fi return } + +hl(){ + #cat | grep --color=always -E "(^|($@))" + perl -MTerm::ANSIColor -pe 's/('$@')/color("red").$1.color("reset")/ge' +}