From f1f5fcc9f502c4f65879593d7934f4d1902598c9 Mon Sep 17 00:00:00 2001 From: Christopher Apple Date: Mon, 30 Mar 2020 09:06:55 -0700 Subject: [PATCH] Feature toggle log graph, fish --- forgit.plugin.fish | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/forgit.plugin.fish b/forgit.plugin.fish index 5566f4f..1d6ca49 100755 --- a/forgit.plugin.fish +++ b/forgit.plugin.fish @@ -42,7 +42,14 @@ function forgit::log --bind=\"ctrl-y:execute-silent(echo {} |grep -Eo '[a-f0-9]+' | head -1 | tr -d '\n' | $copy_cmd)\" $FORGIT_LOG_FZF_OPTS " - eval "git log --graph --color=always --format='%C(auto)%h%d %s %C(black)%C(bold)%cr' $argv $forgit_emojify" | + + if set -q FORGIT_LOG_GRAPH_ENABLE + set graph "--graph" + else + set graph "" + end + + eval "git log $graph --color=always --format='%C(auto)%h%d %s %C(black)%C(bold)%cr' $argv $forgit_emojify" | env FZF_DEFAULT_OPTS="$opts" fzf --preview="$cmd" end