mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-26 02:12:33 +01:00
adding a subversion lib module
This commit is contained in:
parent
4fadc30247
commit
0709ec9125
1 changed files with 16 additions and 0 deletions
16
lib/svn.zsh
Normal file
16
lib/svn.zsh
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
# utility functions for subversion
|
||||||
|
# based on oh-my-zsh git lib module
|
||||||
|
|
||||||
|
function svn_dirty {
|
||||||
|
if [[ -n $(svn status) ]]; then
|
||||||
|
echo "$ZSH_THEME_SVN_PROMPT_DIRTY"
|
||||||
|
else
|
||||||
|
echo "$ZSH_THEME_SVN_PROMPT_CLEAN"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function svn_prompt_info {
|
||||||
|
info=$(svn info 2>/dev/null) || return
|
||||||
|
rev=$(echo "$info" | grep Revision | sed 's/Revision: //')
|
||||||
|
echo "${ZSH_THEME_GIT_PROMPT_PREFIX}r${rev}$(svn_dirty)${ZSH_THEME_GIT_PROMPT_SUFFIX}"
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue