Intelligent auto complete for phased git file names used with diffftool

I would like to have smart auto-completion of existing phased file names when using git diff.

Example:

modified:   DIR1/LongCamelCaseFileName.h
modified:   DIR1/AnotherLongCamelCaseFileName.m
modified:   DIR1/AndThereAreALotOfThemInDir1.m
modified:   DIR2/file4.m

and here, using the bash tab-auto-complete functionality that I would like to use with

git diff

where, by smart, I mean that after entering git diff, I will need to enter only the short part of the phased file name that I want to distinguish, and without dirname, for example,

git diff And<TAB>

will result in

git diff DIR1/AndThereAreALotOfThemInDir1.m

In fact, without the dir-ommiting part, this will still be useful (auto-complete using a pool of phased files only).

+3
source share
1

, , :

:

git add -i

:

git add *And*
+4

Source: https://habr.com/ru/post/1748502/


All Articles