commit ff38eaa368923b9369bd460b8f6b66161e6195bb parent c085eed6ce1d1faa2f4d84e71c4a5aa565781b57 Author: oscarbenedito <oscar@obenedito.org> Date: Tue, 3 Dec 2019 00:16:16 +0100 Fixes vim statusline bug Diffstat:
M | dot_vimrc.md | | | 2 | +- |
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dot_vimrc.md b/dot_vimrc.md @@ -103,7 +103,7 @@ endif First of all, a function to get the git branch we are editing (if we are). ```vim file dot_vimrc function! GitBranch() - let l:branchname = system("cd ".expand('%:p:h')." && git rev-parse --abbrev-ref HEAD 2>/dev/null | tr -d '\n'") + let l:branchname = system("cd '".expand('%:p:h')."' && git rev-parse --abbrev-ref HEAD 2>/dev/null | tr -d '\n'") return strlen(l:branchname) > 0?' '.l:branchname.' ':'' endfunction ```