From 24183eb22d4dae3e33705af936d67e5f16ff0b53 Mon Sep 17 00:00:00 2001 From: Wenxuan Date: Mon, 9 Apr 2018 17:33:46 +0800 Subject: [PATCH] Improve gd command Now gd works in subdirectory of repo. Former-commit-id: 576891ac7fb44b69187de903c9233231338dc0e5 --- forgit.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/forgit.plugin.zsh b/forgit.plugin.zsh index 23168ed..a43afc0 100644 --- a/forgit.plugin.zsh +++ b/forgit.plugin.zsh @@ -38,7 +38,7 @@ glo() { gd() { inside_work_tree || return 1 local cmd="git diff --color=always -- {} $emojify $fancy" - git ls-files --modified | + git ls-files --modified $(git rev-parse --show-toplevel)| wfxr::fzf -e -0 \ --bind="enter:execute($cmd |LESS='-R' less)" \ --preview="$cmd"