Merge remote-tracking branch '5paceToast/ksh-autoload'

This commit is contained in:
Maxime Coste 2017-05-10 10:06:30 +01:00
commit 6b518e4e46

View File

@ -23,7 +23,7 @@ def -params 1 -docstring "colorscheme <name>: enable named colorscheme" \
}} }}
%sh{ %sh{
autoload() { autoload_directory() {
dir=$1 dir=$1
for rcfile in ${dir}/*.kak; do for rcfile in ${dir}/*.kak; do
if [ -f "$rcfile" ]; then if [ -f "$rcfile" ]; then
@ -32,7 +32,7 @@ def -params 1 -docstring "colorscheme <name>: enable named colorscheme" \
done done
for subdir in ${dir}/*; do for subdir in ${dir}/*; do
if [ -d "$subdir" ]; then if [ -d "$subdir" ]; then
autoload $subdir autoload_directory $subdir
fi fi
done done
} }
@ -42,9 +42,9 @@ def -params 1 -docstring "colorscheme <name>: enable named colorscheme" \
echo "colorscheme default" echo "colorscheme default"
if [ -d "${localconfdir}/autoload" ]; then if [ -d "${localconfdir}/autoload" ]; then
autoload ${localconfdir}/autoload autoload_directory ${localconfdir}/autoload
elif [ -d "${kak_runtime}/autoload" ]; then elif [ -d "${kak_runtime}/autoload" ]; then
autoload ${kak_runtime}/autoload autoload_directory ${kak_runtime}/autoload
fi fi
if [ -f "${kak_runtime}/kakrc.local" ]; then if [ -f "${kak_runtime}/kakrc.local" ]; then