diff options
author | Robby Russell <robby@planetargon.com> | 2015-09-19 08:48:03 -0700 |
---|---|---|
committer | Robby Russell <robby@planetargon.com> | 2015-09-19 08:48:03 -0700 |
commit | 3c782f78f1d93fac94b3637fffe69f20c987bd0d (patch) | |
tree | 827c627c6515324800c4bb76806b3cbfafe3c426 /plugins/svn | |
parent | 4bd6c43cfba17b6d13cd2f3b8f849ae3226e76e9 (diff) | |
parent | 36fea45bfc564c667007421a643df38c02235c8b (diff) | |
download | zsh-3c782f78f1d93fac94b3637fffe69f20c987bd0d.tar.gz zsh-3c782f78f1d93fac94b3637fffe69f20c987bd0d.tar.bz2 zsh-3c782f78f1d93fac94b3637fffe69f20c987bd0d.zip |
Merge pull request #3582 from apjanke/fold-terminalapp-plugin-into-termsupport
Fold terminalapp plugin in to lib/termsupport
Diffstat (limited to 'plugins/svn')
-rw-r--r-- | plugins/svn/svn.plugin.zsh | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/svn/svn.plugin.zsh b/plugins/svn/svn.plugin.zsh index 9f7a4c6eb..816055afe 100644 --- a/plugins/svn/svn.plugin.zsh +++ b/plugins/svn/svn.plugin.zsh @@ -1,16 +1,17 @@ # vim:ft=zsh ts=2 sw=2 sts=2 # function svn_prompt_info() { + local _DISPLAY if in_svn; then if [ "x$SVN_SHOW_BRANCH" = "xtrue" ]; then unset SVN_SHOW_BRANCH _DISPLAY=$(svn_get_branch_name) else _DISPLAY=$(svn_get_repo_name) + _DISPLAY=$(omz_urldecode "${_DISPLAY}") fi echo "$ZSH_PROMPT_BASE_COLOR$ZSH_THEME_SVN_PROMPT_PREFIX\ $ZSH_THEME_REPO_NAME_COLOR$_DISPLAY$ZSH_PROMPT_BASE_COLOR$ZSH_THEME_SVN_PROMPT_SUFFIX$ZSH_PROMPT_BASE_COLOR$(svn_dirty)$(svn_dirty_pwd)$ZSH_PROMPT_BASE_COLOR" - unset _DISPLAY fi } @@ -30,7 +31,7 @@ function svn_get_repo_name() { } function svn_get_branch_name() { - _DISPLAY=$( + local _DISPLAY=$( svn info 2> /dev/null | \ awk -F/ \ '/^URL:/ { \ @@ -49,7 +50,6 @@ function svn_get_branch_name() { else echo $_DISPLAY fi - unset _DISPLAY } function svn_get_rev_nr() { @@ -60,7 +60,7 @@ function svn_get_rev_nr() { function svn_dirty_choose() { if in_svn; then - root=`svn info 2> /dev/null | sed -n 's/^Working Copy Root Path: //p'` + local root=`svn info 2> /dev/null | sed -n 's/^Working Copy Root Path: //p'` if $(svn status $root 2> /dev/null | command grep -Eq '^\s*[ACDIM!?L]'); then # Grep exits with 0 when "One or more lines were selected", return "dirty". echo $1 @@ -77,7 +77,7 @@ function svn_dirty() { function svn_dirty_choose_pwd () { if in_svn; then - root=$PWD + local root=$PWD if $(svn status $root 2> /dev/null | command grep -Eq '^\s*[ACDIM!?L]'); then # Grep exits with 0 when "One or more lines were selected", return "dirty". echo $1 |