let stat info present as markdown block

This commit is contained in:
hophacker 2019-07-14 20:40:30 +08:00
parent 01f8f515e2
commit 2a32e0e068

View File

@ -153,7 +153,8 @@ function gitcopy() {
done
prefix=`git remote get-url origin | sed -E 's/git@github.com:/https:\/\/github.com\//g' | sed -E 's/(.*)\.git/\1/'`
project_name=`echo $prefix | sed -E 's/.*\/(.*)/\1/'`
commits=`git log $commit -n $n --stat --pretty="* [$project_name]($prefix/commit/%H) %an: **%s**"`
commits=`git log $commit -n $n --stat --pretty="
* [$project_name]($prefix/commit/%H) %an: **%s**" | sed 's/^[^*]/> /'`
which pbcopy &> /dev/null
if [[ $? == '0' ]]; then
echo $commits | pbcopy