Try to load an eventual kakrc.local next to the common kakrc

This commit is contained in:
Maxime Coste 2016-03-27 19:34:59 +01:00
parent dec1fff9f9
commit c8490c4e86
2 changed files with 6 additions and 2 deletions

View File

@ -210,8 +210,8 @@ At startup, if `-n` is not specified, Kakoune will try to source the file
`../share/kak/kakrc` relative to the kak binary. This kak file will then try `../share/kak/kakrc` relative to the kak binary. This kak file will then try
to recursively source any files in `$XDG_CONFIG_HOME/kak/autoload` (with to recursively source any files in `$XDG_CONFIG_HOME/kak/autoload` (with
`$XDG_CONFIG_HOME` defaulting to `$HOME/.config`, and falling back to `$XDG_CONFIG_HOME` defaulting to `$HOME/.config`, and falling back to
`../share/kak/autoload/` if that autoload directory does not exists), `../share/kak/autoload/` if that autoload directory does not exists), then
and finally `$XDG_CONFIG_HOME/kak/kakrc`. `../share/kak/kakrc.local` if it exists, and finally `$XDG_CONFIG_HOME/kak/kakrc`.
That leads to the following behaviour: by default, with no user autoload That leads to the following behaviour: by default, with no user autoload
directory, the system wide autoload directory is used, once the user wants directory, the system wide autoload directory is used, once the user wants

View File

@ -57,6 +57,10 @@ def -params 1 -docstring "colorscheme <name>: enable named colorscheme" \
autoload ${kak_runtime}/autoload autoload ${kak_runtime}/autoload
fi fi
if [ -f "${kak_runtime}/kakrc.local" ]; then
echo "source '${kak_runtime}/kakrc.local'"
fi
if [ -f "${localconfdir}/kakrc" ]; then if [ -f "${localconfdir}/kakrc" ]; then
echo "source '${localconfdir}/kakrc'" echo "source '${localconfdir}/kakrc'"
fi fi