How to configure git bash command line completion?

前端 未结 12 1418
猫巷女王i
猫巷女王i 2020-11-28 18:50

E.g. on a fresh ubuntu machine, I\'ve just run sudo apt-get git, and there\'s no completion when typing e.g. git check[tab].

I didn\'t find

12条回答
  •  野趣味
    野趣味 (楼主)
    2020-11-28 19:43

    Arch Linux

    Source /usr/share/git/completion/git-completion.bash in one of the bash startup files.

    For example:

    # ~/.bashrc
    
    source /usr/share/git/completion/git-completion.bash
    

    You may be able to find the script in other locations like /usr/share/bash-completion/completions/git but these scripts did not work for me.

提交回复
热议问题