mirror of
https://github.com/wfxr/forgit.git
synced 2026-09-10 15:26:16 -04:00
Bugfix: gd(git diff) for fish does not work with arguments
This commit is contained in:
parent
2db37aa4ec
commit
6b4df330e1
|
|
@ -59,11 +59,11 @@ function forgit::log -d "git commit viewer"
|
|||
end
|
||||
|
||||
## git diff viewer
|
||||
function forgit::diff -d "git diff viewer"
|
||||
function forgit::diff -d "git diff viewer"
|
||||
forgit::inside_work_tree || return 1
|
||||
if count $argv > /dev/null
|
||||
if git rev-parse "$1" > /dev/null 2>&1
|
||||
set commit "$1" && set files "$2"
|
||||
if git rev-parse "$argv[1]" > /dev/null 2>&1
|
||||
set commit "$argv[1]" && set files "$argv[2..]"
|
||||
else
|
||||
set files "$argv"
|
||||
end
|
||||
|
|
@ -228,7 +228,7 @@ function forgit::checkout::branch -d "git checkout branch selector" --argument-n
|
|||
|
||||
set opts "
|
||||
$FORGIT_FZF_DEFAULT_OPTS
|
||||
+s +m --tiebreak=index
|
||||
+s +m --tiebreak=index
|
||||
$FORGIT_CHECKOUT_BRANCH_FZF_OPTS
|
||||
"
|
||||
eval "$cmd" | env FZF_DEFAULT_OPTS="$opts" fzf --preview="$preview" | xargs -I% git checkout %
|
||||
|
|
|
|||
Loading…
Reference in a new issue