From b6555d07a94753bf832bb3c686e772e72b686d56 Mon Sep 17 00:00:00 2001 From: Chloe Kudryavtsev Date: Mon, 8 May 2017 21:35:48 -0400 Subject: [PATCH] Rename kakrc::autoload to kakrc::autoload_directory `autoload` is a reserved keyword in the ksh family of shells. Some of these are common `/bin/sh` providers (e.g mksh). Renaming it to have a prefix fixes autoloading on such systems (see #1353). This should not have any side effects due to the limited scope. --- share/kak/kakrc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/share/kak/kakrc b/share/kak/kakrc index ba1a7254..4b234fc3 100644 --- a/share/kak/kakrc +++ b/share/kak/kakrc @@ -23,7 +23,7 @@ def -params 1 -docstring "colorscheme : enable named colorscheme" \ }} %sh{ - autoload() { + autoload_directory() { dir=$1 for rcfile in ${dir}/*.kak; do if [ -f "$rcfile" ]; then @@ -32,7 +32,7 @@ def -params 1 -docstring "colorscheme : enable named colorscheme" \ done for subdir in ${dir}/*; do if [ -d "$subdir" ]; then - autoload $subdir + autoload_directory $subdir fi done } @@ -42,9 +42,9 @@ def -params 1 -docstring "colorscheme : enable named colorscheme" \ echo "colorscheme default" if [ -d "${localconfdir}/autoload" ]; then - autoload ${localconfdir}/autoload + autoload_directory ${localconfdir}/autoload elif [ -d "${kak_runtime}/autoload" ]; then - autoload ${kak_runtime}/autoload + autoload_directory ${kak_runtime}/autoload fi if [ -f "${kak_runtime}/kakrc.local" ]; then