]> git.nbdom.net Git - nb.git/commitdiff
hl
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Tue, 28 Jul 2015 18:53:34 +0000 (19:53 +0100)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Tue, 28 Jul 2015 18:53:34 +0000 (19:53 +0100)
etc/profile.d/0default.sh

index 03811450c6587d5e638c0edaf0a1395355644ef3..5a9fe88eda546f4496f50792b9f04156b6f968c8 100644 (file)
@@ -45,3 +45,8 @@ getexp() {
   fi
   return
 }
+
+hl(){ 
+  #cat | grep --color=always -E "(^|($@))"
+  perl -MTerm::ANSIColor -pe 's/('$@')/color("red").$1.color("reset")/ge'
+}