From 3d90ee5686e54fb1c3242f10e644a789579a4372 Mon Sep 17 00:00:00 2001 From: Freed-Wu Date: Wed, 23 Sep 2020 21:34:24 +0800 Subject: Add trim for GentooGetUser() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 吴振宇 Closes: https://github.com/gentoo/gentoo-syntax/pull/31 Signed-off-by: Michał Górny --- plugin/gentoo-common.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin/gentoo-common.vim b/plugin/gentoo-common.vim index a15636a..1c9f4ed 100644 --- a/plugin/gentoo-common.vim +++ b/plugin/gentoo-common.vim @@ -13,8 +13,8 @@ let g:loaded_gentoo_common=1 fun! GentooGetUser() let l:result = expand("\$ECHANGELOG_USER") if l:result ==# "\$ECHANGELOG_USER" - let l:email = executable('git') ? system('git config --global user.email') : expand('$HOST') - let l:name = executable('git') ? system('git config --global user.name') : expand('$USER') + let l:email = executable('git') ? trim(system('git config --global user.email')) : expand('$HOST') + let l:name = executable('git') ? trim(system('git config --global user.name')) : expand('$USER') let l:result = l:name . ' <' . l:email . '>' endif return l:result -- cgit v1.2.3-65-gdbad