开发者

Smart auto-completition for staged git file names, used with difftool

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 开发者_如何学Gowithout a dirname, so for example

git diff And<TAB>

would result in

git diff DIR1/AndThereAreALotOfThemInDir1.m

Actually, without a dir-ommiting-part it would be still useful (auto-completing using only staged files pool).


This would be a nice feature, but there are already few alternatives, e.g.:

Interactive mode:

git add -i

Wildcards:

git add *And*
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜