From fc26455e79be92b13a7f7765b29949e5c601e3a8 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Wed, 8 Nov 2017 12:48:00 +1300 Subject: 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. --- vim/ftplugin/sh.vim | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'vim/ftplugin') 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 \ :execute b:check " 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 -' -- cgit v1.2.3