-
-
Save lucaswiman/c9292dd489fb1f9e28f9632c20b61200 to your computer and use it in GitHub Desktop.
grep co-occurrences
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 git-co-occurrences() { | |
pattern1="$1" | |
pattern2="$2" | |
comm -12 <(git grep -E "$pattern1" | cut -d ':' -f1 | sort | uniq) <(git grep -E "$pattern2" | cut -d ':' -f1 | sort | uniq) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment