Skip to content

Instantly share code, notes, and snippets.

@badp
Last active August 23, 2016 14:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save badp/6ccd0bd5c4f74f985dbc161ff9f0aea7 to your computer and use it in GitHub Desktop.
Save badp/6ccd0bd5c4f74f985dbc161ff9f0aea7 to your computer and use it in GitHub Desktop.
Hastily hacked together color highlighting for csearch
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