[Assorted-commits] SF.net SVN: assorted:[1547] shell-tools/trunk/src/bash-commons/bashrc.bash
Brought to you by:
yangzhang
From: <yan...@us...> - 2010-01-21 02:30:52
|
Revision: 1547 http://assorted.svn.sourceforge.net/assorted/?rev=1547&view=rev Author: yangzhang Date: 2010-01-21 02:30:29 +0000 (Thu, 21 Jan 2010) Log Message: ----------- added svn to PS1 Modified Paths: -------------- shell-tools/trunk/src/bash-commons/bashrc.bash Modified: shell-tools/trunk/src/bash-commons/bashrc.bash =================================================================== --- shell-tools/trunk/src/bash-commons/bashrc.bash 2010-01-21 02:30:15 UTC (rev 1546) +++ shell-tools/trunk/src/bash-commons/bashrc.bash 2010-01-21 02:30:29 UTC (rev 1547) @@ -777,8 +777,12 @@ then git_ps1="\[$fg_yellow\]\$( __git_ps1 'git(%s) ' )\[$normal_color\]" else git_ps1='' fi + if type svn >& /dev/null + then svn_ps1="\[$fg_yellow\]\$( svn info 2> /dev/null | sed -n -e '/^Revision: \([0-9]*\).*$/ s//svn(\1)/p' || true )\[$normal_color\]" + else svn_ps1='' + fi - PS1="$titlebar\n$user_host $exitstatus$datetime $path $git_ps1\n\$ " + PS1="$titlebar\n$user_host $exitstatus$datetime $path $git_ps1$svn_ps1\n\$ " # \[\] is for PS1/PS2 only; lets bash calculate word wrapping correctly. # it's not for general terminal usage. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |