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.
This commit is contained in:
parent
787ea7bc49
commit
b6555d07a9
|
@ -23,7 +23,7 @@ def -params 1 -docstring "colorscheme <name>: 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 <name>: 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 <name>: 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
|
||||
|
|
Loading…
Reference in New Issue
Block a user