1 |
commit: 3d90ee5686e54fb1c3242f10e644a789579a4372 |
2 |
Author: Freed-Wu <Wuzy01 <AT> qq <DOT> com> |
3 |
AuthorDate: Wed Sep 23 13:34:24 2020 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Oct 7 10:07:16 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/gentoo-syntax.git/commit/?id=3d90ee56 |
7 |
|
8 |
Add trim for GentooGetUser() |
9 |
|
10 |
Signed-off-by: 吴振宇 <Wuzy01 <AT> qq.com> |
11 |
Closes: https://github.com/gentoo/gentoo-syntax/pull/31 |
12 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
13 |
|
14 |
plugin/gentoo-common.vim | 4 ++-- |
15 |
1 file changed, 2 insertions(+), 2 deletions(-) |
16 |
|
17 |
diff --git a/plugin/gentoo-common.vim b/plugin/gentoo-common.vim |
18 |
index a15636a..1c9f4ed 100644 |
19 |
--- a/plugin/gentoo-common.vim |
20 |
+++ b/plugin/gentoo-common.vim |
21 |
@@ -13,8 +13,8 @@ let g:loaded_gentoo_common=1 |
22 |
fun! GentooGetUser() |
23 |
let l:result = expand("\$ECHANGELOG_USER") |
24 |
if l:result ==# "\$ECHANGELOG_USER" |
25 |
- let l:email = executable('git') ? system('git config --global user.email') : expand('$HOST') |
26 |
- let l:name = executable('git') ? system('git config --global user.name') : expand('$USER') |
27 |
+ let l:email = executable('git') ? trim(system('git config --global user.email')) : expand('$HOST') |
28 |
+ let l:name = executable('git') ? trim(system('git config --global user.name')) : expand('$USER') |
29 |
let l:result = l:name . ' <' . l:email . '>' |
30 |
endif |
31 |
return l:result |