Inter 🌐 Media

  • Home
  • Blog
  • Portfolio
  • Newsletter
  • Contact

Enabling the auto-complete feature in Git with Z-shell

May 30th, 2020

2 minute read 📗
  • Link to Enabling the auto-complete feature in Git with Z-shell podcast on anchorfm

Not only can you auto-complete command line commands in Zsh, for example, but you can auto-complete commands in Git as well! And it is quite simple.

First, go to the Git repository on Github and to the following link:

  • https://github.com/git/git/master/contrib/completion/

There, you will see a number of files for different Git shell environments. Bash, Zsh, Prompt (for Windows), to name a couple. I use Zsh, so I downloaded the git-completion.zsh file to my desktop and then moved it into my ~ (Home) directory. After that, I added the following to my .zshrc file (also located in my home directory):

source ~/git-completion.zsh

I placed this line right above my PATH exports.

I made sure to quit Terminal and then open a new Terminal window instance before testing out my new Git auto-complete feature. And it works! For example, if I type che followed by the tab key, I get the following in Terminal:

Git auto-complete feature in action

There are other ways of getting the git-completion.zsh file onto your desktop from Github such as with git pull, but I will get into that in another podcast (post).

I will be embedding this episode of Plugging in The Holes along with a transcript in the form of a post on interglobalmedianetwork.com for your hearing and reading pleasure. Bye for now!

Related Resources

  • Git repository on Github: Completion

  • Git in Other Environments - Git in Zsh

Tagged in: git auto-completion
Categorized under: git
Discuss On Twitter Mobile
  • Facebook
  • Twitter
  • Linkedin
  • Hacker News
  • Reddit
Maria D. Campbell

Created by Maria D. Campbell who lives and works in New York City building and teaching useful things. You should follow her on Twitter.

  • ← Newer
  • Older →
  • Business Hours
  • Monday: 9:00am - 5:00pm
  • Tuesday: 9:00am - 5:00pm
  • Wednesday: 9:00am - 5:00pm
  • Thursday: 9:00am - 5:00pm
  • Friday: 9:00am - 5:00pm
  • Saturday: Closed
  • Sunday: Closed
  • And By Appointment
  • Podcast
  • Plugging In The Holes
  • Login
  • Admin Login
  • Newsletter
  • Newsletter
  • follow us on Github
  • follow us on Twitter
  • connect with us on Instagram
  • connect with us on Linkedin
ContactSitemapRSS
© 2022 Inter-Global Media Network, Inc.