Junio C Hamano, thank you for the comment. I added the diff_combo_supported function as you suggested. Though it calls to the `true` or the `false` builtins as I find them much clearer than the "return" command with inverted status. It is really confusing that C and most other programming languages adequately interpret non-zero as truth value and zero as falsity value unlike Unix Shell. Are such changes acceptable? As regards broken tests, it may seem silly but that error was due to a single missing colon. I corrected the mistake and added some automated tests of this new feature. diff --git a/git-difftool--helper.sh b/git-difftool--helper.sh index 529d55c96d..85a6dc9c30 100755 --- a/git-difftool--helper.sh +++ b/git-difftool--helper.sh @@ -31,7 +31,7 @@ prompt_before_launch () { do printf "Launch '%s' [Y/n]? " "${GIT_DIFFTOOL_EXTCMD:-$merge_tool}" read ans 2>/dev/null || return 1 - case "${ans-y}" in + case "${ans:-y}" in [yY]*) return 0 ;; [nN]*) return 1 ;; esac Changes compared to v2: * Introduced the diff_combo_supported function. * Fixed default answer to difftool prompting. * More docs about the diff tool mechanism. * New auto-tests of the feature. Nicholas Guriev (4): mergetools: support difftool.tabbed setting difftool-helper: conciliate difftool.tabbed and difftool.prompt settings doc: describe new difftool.tabbed feature t7800: new tests of difftool.tabbed feature Documentation/config/difftool.txt | 6 + Documentation/git-difftool.txt | 19 ++- Documentation/git-mergetool--lib.txt | 62 ++++++++++ Documentation/git.txt | 8 ++ builtin/difftool.c | 7 +- diff.c | 10 +- git-difftool--helper.sh | 39 ++++-- git-mergetool--lib.sh | 71 ++++++++++- mergetools/meld | 8 ++ mergetools/vimdiff | 21 ++++ t/t7800-difftool.sh | 175 ++++++++++++++++++++++++++- 11 files changed, 401 insertions(+), 25 deletions(-) -- 2.27.0