aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-11-08 12:48:00 +1300
committerTom Ryder <tom@sanctum.geek.nz>2017-11-08 12:48:00 +1300
commitfc26455e79be92b13a7f7765b29949e5c601e3a8 (patch)
treedabb3a3f498391127fffe4a815e358519f77a1f6
parentba1c36ee30af10c9199a90114ca97264803cf794 (diff)
downloaddotfiles-fc26455e79be92b13a7f7765b29949e5c601e3a8.tar.gz
Remove overkill defined-and-false check of sh vars
syntax/sh.vim only uses the existence of these variables for its checks and as far as I can see never their actual values, so let's not overdo things.
-rw-r--r--vim/ftplugin/sh.vim8
1 files changed, 4 insertions, 4 deletions
diff --git a/vim/ftplugin/sh.vim b/vim/ftplugin/sh.vim
index 5faf9055..29dc7c11 100644
--- a/vim/ftplugin/sh.vim
+++ b/vim/ftplugin/sh.vim
@@ -21,9 +21,9 @@ if exists('b:is_bash') && executable('han')
endif
" Map checker based on shell family
-if exists('b:is_bash') && b:is_bash
+if exists('b:is_bash')
let b:check = 'write !bash -n'
-elseif exists('b:is_kornshell') && b:is_kornshell
+elseif exists('b:is_kornshell')
let b:check = 'write !ksh -n'
else
let b:check = 'write !sh -n'
@@ -33,9 +33,9 @@ nnoremap <buffer> <silent>
\ :<C-U>execute b:check<CR>
" Map linter based on shell family
-if exists('b:is_bash') && b:is_bash
+if exists('b:is_bash')
let b:lint = 'write !shellcheck -s bash -'
-elseif exists('b:is_kornshell') && b:is_kornshell
+elseif exists('b:is_kornshell')
let b:lint = 'write !shellcheck -s ksh -'
else
let b:lint = 'write !shellcheck -s sh -'