I've recently learned that on linux, git can be setup to autocomplete commands: If you type
git br<TAB>
Then it will complete it to git branch
.
Can the same auto-completion be set up on Windows?
Update - I'm usually working with git via cmd.exe (I added git to my path). This question is about adding auto-completion to git on cmd, if that's possible.
Using autocomplete is as simple as pressing the [TAB] and the active command line options will fill-in. If more than one option is available, you can hit [TAB] twice to display all possible choices and continue typing until there is only one matching choice left.
All you have to do is load Command Prompt (Load the Start menu, then click "Run", type cmd and hit enter), then you can use Git commands as normal.
To install Git, run the following command: sudo apt-get install git-all . Once the command output has completed, you can verify the installation by typing: git version .
Installing Clink seems to make this work by magic, verified in cmd, Console2, and ConEmu.
http://mridgers.github.io/clink/
UPDATE: To get ConEmu and clink to work properly with the more recent versions, it was necessary to install clink into the ConEmu folder. See https://github.com/mridgers/clink/issues/339 and https://github.com/Maximus5/ConEmu/issues/270 for more info.
You have to use some form of bash to get it to work, either git bash that comes with msysgit or some other bash (which you need to setup to use the autocompletion used in git bash). With cmd.exe you will have no luck.
Look at this as a sign for you to leave old rusty cmd.exe behind. Enter the light of bash! : )
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With