From 39e170e993d57e1d37cfbbc8706e1f0374750db4 Mon Sep 17 00:00:00 2001 From: hophacker Date: Thu, 14 Feb 2019 18:30:43 +0800 Subject: [PATCH] make gihtublog message more readable --- zsh/functions.zsh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/zsh/functions.zsh b/zsh/functions.zsh index d246ea9..9c237f6 100644 --- a/zsh/functions.zsh +++ b/zsh/functions.zsh @@ -132,5 +132,6 @@ function init_db() { function githublog() { repo=`git remote get-url origin | sed -E 's/.*:(.*)\.git/\1/'` - git log --pretty="[%an - %s](https://github.com/$repo/commit/%H)" + project_name=`echo $repo | sed -E 's/.*\/(.*)/\1/'` + git log --pretty="* [$project_name](https://github.com/$repo/commit/%H) %an: **%s**" }