Smart auto-completition for staged git file names, used with difftool
- by piobyz
I'd like to have a smart auto-completition of currently staged 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 bash tab-auto-complete functionality I'd like to use it with
git diff
where by smart I mean that after typing git diff I'd need to type only a short part of the staged file name that I want to diff, and without a dirname, so for example
git diff And<TAB>
would result in
git diff AndThereAreALotOfThemInDir1.m
Actually, without a dir-ommiting-part it would be still useful (auto-completing using only staged files pool).