diff --git a/vim/.vim/ftplugin/bash.vim b/vim/.vim/ftplugin/bash.vim index 1fb8b26..c69fa31 100644 --- a/vim/.vim/ftplugin/bash.vim +++ b/vim/.vim/ftplugin/bash.vim @@ -1,2 +1,8 @@ " Use shfmt as ALE fixer for bash let b:ale_fixers=[ 'shfmt' ] + +" Indent with 4 spaces, simplify script, indent switch cases, use Bash variant +let b:ale_sh_shfmt_options='-i 4 -s -ci -ln bash' + +" Use bash dialect explicitly, require explicit empty string test +let b:ale_sh_shellcheck_options='-s bash -o avoid-nullary-conditions' diff --git a/vim/.vim/ftplugin/sh.vim b/vim/.vim/ftplugin/sh.vim index 8ea4807..f4e1bf1 100644 --- a/vim/.vim/ftplugin/sh.vim +++ b/vim/.vim/ftplugin/sh.vim @@ -1,2 +1,8 @@ " Use shfmt as ALE fixer for sh let b:ale_fixers=[ 'shfmt' ] + +" Indent with 4 spaces, simplify the code, indent switch cases, use POSIX +let b:ale_sh_shfmt_options='-i 4 -s -ci -ln posix' + +" Require explicit empty string test +let b:ale_sh_shellcheck_options='-o avoid-nullary-conditions' diff --git a/vim/.vim/ftplugin/zsh.vim b/vim/.vim/ftplugin/zsh.vim index 1685f86..20233e4 100644 --- a/vim/.vim/ftplugin/zsh.vim +++ b/vim/.vim/ftplugin/zsh.vim @@ -1,2 +1,8 @@ " Use shfmt as ALE fixer for zsh let b:ale_fixers=[ 'shfmt' ] + +" Indent with 4 spaces, simplify script, indent switch cases, use Bash variant +let b:ale_sh_shfmt_options='-i 4 -s -ci -ln bash' + +" Use bash dialect explicitly, require explicit empty string test +let b:ale_sh_shellcheck_options='-s bash -o avoid-nullary-conditions'