20 Nov 2012 amits   » (Journeyer)

__git_ps1 not found after upgrade to Fedora 18

If you have enabled git information in the shell prompt (like branch name, working tree status, etc.) [1], an upgrade to F18 breaks this functionality.  What’s worse, __git_ps1 (a shell function) isn’t found, and a yum plugin goes looking for a matching package name to install, making running any command on the shell *very* slow.

A workaround, till the bug is fixed, is to do:

ln -s /usr/share/git-core/contrib/completion/git-prompt.sh  /etc/profile.d/

Bug 878428, if you want to track progress.

[1] To add such git information in the shell display (for bash), add this to your .bashrc file:

export GIT_PS1_SHOWDIRTYSTATE=true
export GIT_PS1_SHOWUNTRACKEDFILES=true
export PS1='\[\033[00;36m\]\u@\h\[\033[00m\]:\[\033[01;34m\] \w\[\033[00m\]$(__git_ps1 " (%s)")\$ '

Syndicated 2012-11-20 12:22:00 (Updated 2013-05-22 10:26:58) from Think. Debate. Innovate. - Amit Shah's blog

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!