How to configure git bash command line completion?

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

    Ubuntu 14.10

    Install git-core and bash-completion

    sudo apt-get install -y git-core bash-completion
    
    • For current session usage

      source /usr/share/bash-completion/completions/git
      
    • To have it always on for all sessions

      echo "source /usr/share/bash-completion/completions/git" >> ~/.bashrc
      

提交回复
热议问题