From c8490c4e86f7e4b20a6a53437dbf7524ae3ea61f Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Sun, 27 Mar 2016 19:34:59 +0100 Subject: [PATCH] Try to load an eventual kakrc.local next to the common kakrc --- README.asciidoc | 4 ++-- share/kak/kakrc | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.asciidoc b/README.asciidoc index 7425139b..044ffdc9 100644 --- a/README.asciidoc +++ b/README.asciidoc @@ -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 to recursively source any files in `$XDG_CONFIG_HOME/kak/autoload` (with `$XDG_CONFIG_HOME` defaulting to `$HOME/.config`, and falling back to -`../share/kak/autoload/` if that autoload directory does not exists), -and finally `$XDG_CONFIG_HOME/kak/kakrc`. +`../share/kak/autoload/` if that autoload directory does not exists), then +`../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 directory, the system wide autoload directory is used, once the user wants diff --git a/share/kak/kakrc b/share/kak/kakrc index eb7788bc..9d1eced1 100644 --- a/share/kak/kakrc +++ b/share/kak/kakrc @@ -57,6 +57,10 @@ def -params 1 -docstring "colorscheme : enable named colorscheme" \ autoload ${kak_runtime}/autoload fi + if [ -f "${kak_runtime}/kakrc.local" ]; then + echo "source '${kak_runtime}/kakrc.local'" + fi + if [ -f "${localconfdir}/kakrc" ]; then echo "source '${localconfdir}/kakrc'" fi