Improve gd command

Now gd works in subdirectory of repo.


Former-commit-id: 576891ac7f
This commit is contained in:
Wenxuan 2018-04-09 17:33:46 +08:00
parent 4269df5b4a
commit 24183eb22d

View file

@ -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"