From 2a32e0e068569251d05c7f7b5f856c48daf30416 Mon Sep 17 00:00:00 2001 From: hophacker Date: Sun, 14 Jul 2019 20:40:30 +0800 Subject: [PATCH] let stat info present as markdown block --- zsh/functions.zsh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/zsh/functions.zsh b/zsh/functions.zsh index 5375a6f..36049ec 100644 --- a/zsh/functions.zsh +++ b/zsh/functions.zsh @@ -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