Last active
August 23, 2016 14:11
-
-
Save badp/6ccd0bd5c4f74f985dbc161ff9f0aea7 to your computer and use it in GitHub Desktop.
Hastily hacked together color highlighting for csearch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function cs -a term | |
csearch -n -- $term \ | |
| env GREP_COLORS='mt=02;35' grep --color=always -P '^[^:]+:[^:]+:' \ | |
# http://unix.stackexchange.com/a/305262/2179 | |
| env grep --color=always -P -- $term \ | |
| less -RFX | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment