Git bash-completion with filename support?

后端 未结 4 1302
独厮守ぢ
独厮守ぢ 2020-12-09 12:28

is there a bash-completion script that supports filename completion? I use mostly mercurial and there I can type:

hg diff test/test_
4条回答
  •  春和景丽
    2020-12-09 12:46

    Not really your desired answer but I wanted to let you know that soon fish (friendly interactive shell) will give you git filename completion support out of the box. It is currently in master with a 2.3.0 release coming soon.

    https://github.com/fish-shell/fish-shell/issues/901
    https://github.com/fish-shell/fish-shell/pull/2364
    https://github.com/fish-shell/fish-shell/commit/c5c59d4acb00674bc37198468b5978f69484c628

    If you have a status like this:

    $ git status
    modified: ../README.md
    $ git add 
    :/README.md 
    

    You can also just type README and hit tab and it will insert it for you if it is the only match. Friggin nice!

提交回复
热议问题