summaryrefslogtreecommitdiff
path: root/ale_linters
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2016-10-09 20:39:14 +0100
committerw0rp <devw0rp@gmail.com>2016-10-09 20:39:14 +0100
commitb5e4538699f2850ca9c9ebfefad8fcbd18fe5eba (patch)
tree58796537e2e24dfca76a34b162e7279528ed0da7 /ale_linters
parent2d32c312059e10da03e8f0b9627b2f9ee49bd6bf (diff)
downloadale-b5e4538699f2850ca9c9ebfefad8fcbd18fe5eba.zip
#69 Change the default shell for shell linting
Diffstat (limited to 'ale_linters')
-rw-r--r--ale_linters/sh/shell.vim6
1 files changed, 5 insertions, 1 deletions
diff --git a/ale_linters/sh/shell.vim b/ale_linters/sh/shell.vim
index 979bda3f..8b45c49b 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)