Avoid spurious error on empty autoload folders

This commit is contained in:
Maxime Coste 2016-01-29 08:48:26 +00:00
parent f2dac6ca15
commit c27778497e

View File

@ -36,7 +36,9 @@ def -params 1 -docstring "colorscheme <name>: enable named colorscheme" \
autoload() { autoload() {
dir=$1 dir=$1
for rcfile in ${dir}/*.kak; do for rcfile in ${dir}/*.kak; do
echo "try %{ source '${rcfile}' } catch %{ echo -debug Autoload: could not load '${rcfile}' }"; if [ -f "$rcfile" ]; then
echo "try %{ source '${rcfile}' } catch %{ echo -debug Autoload: could not load '${rcfile}' }";
fi
done done
for subdir in ${dir}/*; do for subdir in ${dir}/*; do
if [ -d "$subdir" ]; then if [ -d "$subdir" ]; then