Skip to content

Instantly share code, notes, and snippets.

@jskripsky
Created July 24, 2012 22:49
Show Gist options
  • Save jskripsky/3173178 to your computer and use it in GitHub Desktop.
Save jskripsky/3173178 to your computer and use it in GitHub Desktop.
Ignore nfs dirs in git-aware prompt (patch)
[...]
__gitdir ()
{
if [ "$(stat -f -c %T .)" = "nfs" ]; then
echo "$1"
elif [ -z "${1-}" ]; then
[...]
# GIT-aware prompt
export GIT_PS1_SHOWDIRTYSTATE='true'
export PS1='[\[\033[01;32m\]\u@\h\[\033[01;34m\] \W\[\033[31m\]$(__git_ps1 " (%s)")\[\033[01;34m\]\[\033[00m\]]\\$ '
# E.g. `[js@funnyfarm bash_completion.d (master)]$ `
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment