How to configure git bash command line completion?

前端 未结 12 1465
猫巷女王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:50

    i had same issue, followed below steps:

    curl https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash -o ~/.git-completion.bash
    

    then add the following lines to your .bash_profile (generally under your home folder)

    if [ -f ~/.git-completion.bash ]; then
      . ~/.git-completion.bash
    fi
    

    source : http://code-worrier.com/blog/autocomplete-git/

提交回复
热议问题