From a985873b255a716efe7e0075ddcab09701eaf5e9 Mon Sep 17 00:00:00 2001 From: druckdev <63563978+druckdev@users.noreply.github.com> Date: Fri, 4 Sep 2020 09:44:45 +0200 Subject: [PATCH] Exit glog if not in git repo --- .config/zsh/plugins/functionsPost.zsh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.config/zsh/plugins/functionsPost.zsh b/.config/zsh/plugins/functionsPost.zsh index 12e79ef..857e6cd 100644 --- a/.config/zsh/plugins/functionsPost.zsh +++ b/.config/zsh/plugins/functionsPost.zsh @@ -323,6 +323,9 @@ function urldec() { } glog() { + # Return if not in git repo + git rev-parse || return + # One line format for fzf list view # abbreviated commit hash (yellow), title and ref names local formatshort='--pretty=format:%C(yellow)%h %Creset%s%C(auto)%d'