From b5e4538699f2850ca9c9ebfefad8fcbd18fe5eba Mon Sep 17 00:00:00 2001 From: w0rp Date: Sun, 9 Oct 2016 20:39:14 +0100 Subject: [PATCH] #69 Change the default shell for shell linting --- ale_linters/sh/shell.vim | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ale_linters/sh/shell.vim b/ale_linters/sh/shell.vim index 979bda3..8b45c49 100644 --- a/ale_linters/sh/shell.vim +++ b/ale_linters/sh/shell.vim @@ -10,7 +10,11 @@ let g:loaded_ale_linters_sh_shell = 1 " This option can be changed to change the default shell when the shell " cannot be taken from the hashbang line. if !exists('g:ale_linters_sh_shell_default_shell') - let g:ale_linters_sh_shell_default_shell = 'bash' + let g:ale_linters_sh_shell_default_shell = fnamemodify($SHELL, ':t') + + if g:ale_linters_sh_shell_default_shell ==# '' + let g:ale_linters_sh_shell_default_shell = 'bash' + endif endif function! ale_linters#sh#shell#GetExecutable(buffer)