From c27778497eaddb0d3099cb3f2f7165ccc6b37634 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Fri, 29 Jan 2016 08:48:26 +0000 Subject: [PATCH] Avoid spurious error on empty autoload folders --- share/kak/kakrc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/share/kak/kakrc b/share/kak/kakrc index b9b46f87..eb7788bc 100644 --- a/share/kak/kakrc +++ b/share/kak/kakrc @@ -36,7 +36,9 @@ def -params 1 -docstring "colorscheme : enable named colorscheme" \ autoload() { dir=$1 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 for subdir in ${dir}/*; do if [ -d "$subdir" ]; then