aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFreed-Wu <Wuzy01@qq.com>2020-09-23 21:34:24 +0800
committerMichał Górny <mgorny@gentoo.org>2020-10-07 12:07:16 +0200
commit3d90ee5686e54fb1c3242f10e644a789579a4372 (patch)
tree6794557009ac32a132a43477173197124e0fd6c5
parentmake use and unuse highlights always red and green (diff)
downloadgentoo-syntax-3d90ee5686e54fb1c3242f10e644a789579a4372.tar.gz
gentoo-syntax-3d90ee5686e54fb1c3242f10e644a789579a4372.tar.bz2
gentoo-syntax-3d90ee5686e54fb1c3242f10e644a789579a4372.zip
Add trim for GentooGetUser()gentoo-syntax-20201007
Signed-off-by: 吴振宇 <Wuzy01@qq.com> Closes: https://github.com/gentoo/gentoo-syntax/pull/31 Signed-off-by: Michał Górny <mgorny@gentoo.org>
-rw-r--r--plugin/gentoo-common.vim4
1 files 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