From c76dc91e02f7e8885e6eb71d725c21b15616ad05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Mon, 20 Dec 2021 11:22:54 +0100 Subject: [PATCH] fix(svn): return true repo name in `svn_get_repo_name` --- plugins/svn/svn.plugin.zsh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/svn/svn.plugin.zsh b/plugins/svn/svn.plugin.zsh index fbc9ee538..851f1a45e 100644 --- a/plugins/svn/svn.plugin.zsh +++ b/plugins/svn/svn.plugin.zsh @@ -19,10 +19,10 @@ in_svn() { } svn_get_repo_name() { - if in_svn; then - LANG=C svn info | sed -n 's/^Repository\ Root:\ .*\///p' | read SVN_ROOT - LANG=C svn info | sed -n "s/^URL:\ .*$SVN_ROOT\///p" - fi + local info name + info="${1:-$(LANG= svn info 2>/dev/null)}" + name="$(sed -n 's/^Repository\ Root:\ .*\///p' <<< "$info")" + omz_urldecode "$name" } svn_get_branch_name() {