One thing I often wished to have when using Git was the ability to autocomplete Git commands and branch names. As I had to learn this week from Markus Prinz’ article A few of my Git tricks, tips and workflows, Git comes with an autocompletion script for the Bash shell.
But to use the autocompletion, you have to enable it. To do that, add the following snippet to your ~/.bashrc
file (if you are using a Mac, see the aforementioned article):
source /etc/bash_completion.d/git
You can then either reload the .bashrc
file with source ~/.bashrc
or open a new shell to see the autocompletion in action.
I started using zsh following the instructions found here:
http://stevelosh.com/blog/2010/02/my-extravagant-zsh-prompt/
Between the benefits is the auto completion for git.
@Joaquin: This looks cool, thanks for sharing!
I don’t recall enabling it myself and there already is autocompletion for git on my system (Ubuntu 10.10).
@Mateusz: It probably differs from distribution to distribution: some will enable it by default, while others like Arch Linux leave it to the user.
Exactly the information I was looking for.
I’m a recent migrant from Ubuntu to Archlinux. And although Ubuntu has everything already configured, it helps to know what script causes which functionality.
Thanks a bunch
@Bibek: You are welcome, and have fun with Archlinux :)
Hi. I came here loonking for a sqlite3 recipe, and i thought to myself “hey! [s]he has a search thingy :D” …
Your search query outputs a Internal Server Error.
Well, it did for me; at least. my keywords were “sqlite3” and “sqlite 3” both times it went bananas
@R3DSMiLE: Thanks for pointing out this issue!
I fixed it temporarily by switching back to use WordPress’ search feature.
I highly recommend you try out oh my zsh — makes the switch to ZSH easy and easily maintainable:
https://github.com/robbyrussell/oh-my-zsh
@alan: Thanks for the hint, looks promising.
…Additional Information ca be found here
[…]The whole glance of your web site is fantastic, let well as the content![…]
…[Trackback]
[…]The overall look of your website is excellent, let neatly as the content material![…]
…Click here for or more Information
[…]I am now not sure where you are getting your info, however good topic.[…]
…Check this out
[…]I am no longer certain the place you’re getting your information, but great topic.[…]
…Websites you should visit
[…]you make blogging glance[…]
…Trackback: More Informations on that topic
[…]I am no longer certain the place you’re getting your information, but great topic.[…]
Bash autocompletion for Git – cakebaker
http://powerclan.forumcrea.com/viewtopic.php?pid=1209