completion: use __gitcomp_builtin in _git_difftool
Since we can't automatically extract diff options for completion yet, difftool will take all options from $__git_diff_common_options. This brings _a lot_ more completable options to difftool. --ignore-submodules is added to $__git_diff_common_options to avoid regression in difftool. But it's a good thing anyway even for other diff commands. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
ddced834da
commit
6cc4bc15f9
@ -1394,7 +1394,7 @@ __git_diff_common_options="--stat --numstat --shortstat --summary
|
|||||||
--dirstat --dirstat= --dirstat-by-file
|
--dirstat --dirstat= --dirstat-by-file
|
||||||
--dirstat-by-file= --cumulative
|
--dirstat-by-file= --cumulative
|
||||||
--diff-algorithm=
|
--diff-algorithm=
|
||||||
--submodule --submodule=
|
--submodule --submodule= --ignore-submodules
|
||||||
"
|
"
|
||||||
|
|
||||||
_git_diff ()
|
_git_diff ()
|
||||||
@ -1435,11 +1435,11 @@ _git_difftool ()
|
|||||||
return
|
return
|
||||||
;;
|
;;
|
||||||
--*)
|
--*)
|
||||||
__gitcomp "--cached --staged --pickaxe-all --pickaxe-regex
|
__gitcomp_builtin difftool "$__git_diff_common_options
|
||||||
--base --ours --theirs
|
--base --cached --ours --theirs
|
||||||
--no-renames --diff-filter= --find-copies-harder
|
--pickaxe-all --pickaxe-regex
|
||||||
--relative --ignore-submodules
|
--relative --staged
|
||||||
--tool="
|
"
|
||||||
return
|
return
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
Loading…
Reference in New Issue
Block a user