Skip to content

Instantly share code, notes, and snippets.

@frafra
Created January 21, 2019 14:03
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 frafra/91654609356870cea281fd7f21995126 to your computer and use it in GitHub Desktop.
Save frafra/91654609356870cea281fd7f21995126 to your computer and use it in GitHub Desktop.
Like `ls -1` but marks path modified by a specific author or a company
#!/bin/bash
#regex="@nina.no$"
regex="$1"
function check {
git log --format="%ae" "$1" | grep -q "$regex"
}
check '.' && echo " * ." || echo " ."
for path in *
do
check "$path" && echo -n " * " || echo -n " "
ls -1 --color=always | grep --color=never "$path" | sort -n | head -n1
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment