checkbashisms.vim is a Vim compiler script that checks a shell (sh) script
for common BASH-specific incompatibilities.
Before using this script, you must have the checkbashisms binary installed.
checkbashisms is part of the devscripts package, originally
written for Debian but is available for many other distros.
To install, place the checkbashisms.vim file in the ~/.vim/compiler
directory.
To automatically set the compiler for sh scripts, put the command in your
~/.vimrc:
if executable("checkbashisms")
autocmd FileType sh compiler checkbashisms
endifYou can use the :Checkbashisms command to inspect your shell script. By
default, a quickfix cwindow will be opened. To disable, put in your
~/.vimrc:
let g:checkbashisms_cwindow = 0To automatically check on write, you can specify
let g:checkbashisms_onwrite = 1Check-on-write is disabled by default.
This software is inspired by the Pylint plugin for Vim, and
incorporates ideas from the syntastic plugin.