From 3060c6b2eae6965929530e23953db7717647813f Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Tue, 26 Aug 2014 17:30:22 +0200 Subject: [PATCH] Do not `expand()` shell vars This is especially important when testing/using variables that do not exist, because then a new shell is spawned by Vim. But since they should be available already in Vim from the (shell) env there is no point in doing so. See also: http://www.reddit.com/r/vim/comments/2el2zo --- syntax_checkers/sh/sh.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/syntax_checkers/sh/sh.vim b/syntax_checkers/sh/sh.vim index d736f296..65d84a97 100644 --- a/syntax_checkers/sh/sh.vim +++ b/syntax_checkers/sh/sh.vim @@ -57,7 +57,7 @@ function! s:GetShell() endif " try to use env variable in case no shebang could be found if b:shell == '' - let b:shell = fnamemodify(expand('$SHELL'), ':t') + let b:shell = fnamemodify($SHELL, ':t') endif endif return b:shell