If you see this 6

Posted by pratik
on Saturday, April 12

Then you’re experiencing modrails !

So here’s your candy :

  • cp /opt/local/etc/bash_completion.d/git ~/.git_auto_complete.sh
  • mate ~/.profile
  • Add “source ~/.git_auto_complete.sh” at the very bottom
  • Open a new shell and go to your git directory
  • Enjoy tabbing
Comments

Leave a response

  1. Hongli LaiApril 12, 2008 @ 09:02 AM

    Ha, nice. :D

  2. GrahamApril 12, 2008 @ 11:42 AM

    Cunning, I like it.

    Thought it worth pointing out how to get MacPorts into that situation in the first place though (+svn is optional, but also gives you support for git-svn):

    If it’s already installed, uninstall or deactivate it. Then install it with the bash_completion variant:

    sudo port install -u git-core +svn +bash_completion
  3. James HillApril 12, 2008 @ 02:16 PM

    Nice, saturday is my passenger experimenting day as well!

  4. Jean-Francois CoutureApril 12, 2008 @ 05:24 PM

    That file also allows you to add the current branch name to your bash prompt (read the instructions at the top). It’s really useful.

  5. napApril 13, 2008 @ 06:00 AM

    Rockin. I spent my Saturday morning doing the exact same thing :-). Not quite ready to move any larger higher-volume production apps quite yet, but been really impressed with ease of setup and performance so far.

  6. Andrew VitApril 13, 2008 @ 10:23 PM

    For those of you who installed git from source, the bash script is in the tarball:

    git-1.5.5/contrib/completion/git-completion.bash

Comment