Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to enable git autocomplete in integrated terminal in VSCode?

I'm using VS Code on Mac. I frequently use integrated terminal in VS Code for performing command line operations relevant to my workspace/project [instead of using Terminal or iTerm].

I am able to use autocomplete for basic shell commands via Integrated terminal in VS Code. For example doing cd followed by a Tab automatically suggests possible directory options for me [just like Terminal or iTerm would].

However, this automatic suggestion doesn't work for git commands. For example, doing git br followed by a Tab should complete to git branch but that's not working.

I looked at User Settings in VS Code [by invoking Cmd + Shift + P -> User Settings -> User -> Extensions -> Git I verified my default terminal for Mac is "Terminal". But however, it's not picking Git commands for autocomplete.

What's missing?

Related issue: https://github.com/Microsoft/vscode/issues/17748

like image 789
Chaitanya Bapat Avatar asked Sep 05 '20 23:09

Chaitanya Bapat


People also ask

How do I turn on autocomplete VS Code?

You can trigger IntelliSense in any editor window by typing Ctrl+Space or by typing a trigger character (such as the dot character (.)

Why is my autocomplete not working in VS Code?

Why is VS Code suggestions not working? If you're coding in JavaScript or TypeScript and finds that VSCode IntelliSense does work but does not behave properly, it's likely that you've selected the wrong language mode. TypeScript and JavaScript share the same language service, so you need to select the right language.


1 Answers

If you're using zsh shell, there is a good and quick solution for it right in this discussion. Git tab completion not working in zsh on mac

Then in VSCode, choose zsh as your default terminal.

like image 85
Manu Avatar answered Oct 20 '22 14:10

Manu