rc lint: Check the lintcmd option is set in :lint-buffer

Calling `:lint-buffer` when `lintcmd` is empty results in a temporary
directory being created, but never removed when the underlying linting
code errors out.
This commit is contained in:
Frank LENORMAND 2020-03-27 10:20:40 +03:00
parent 8f30e37507
commit 7d987c013e

View File

@ -277,6 +277,12 @@ define-command \
} \
lint-buffer \
%{
evaluate-commands %sh{
if [ -z "${kak_opt_lintcmd}" ]; then
echo 'fail The lintcmd option is not set'
exit 1
fi
}
evaluate-commands -draft %{
execute-keys '%'
lint-cleaned-selections %opt{lintcmd}