Override runtime by setting $KAKOUNE_RUNTIME
This commit is contained in:
parent
a82d61c14b
commit
a52822d965
|
@ -306,8 +306,8 @@ The following expansions are supported (with required context _in italics_):
|
||||||
current register when the mapping was triggered
|
current register when the mapping was triggered
|
||||||
|
|
||||||
*%val{runtime}*::
|
*%val{runtime}*::
|
||||||
directory containing the kak support files, determined from Kakoune's
|
the directory containing the kak support files, which is determined from
|
||||||
binary location
|
Kakoune's binary location if `$KAKOUNE_RUNTIME` is not set
|
||||||
|
|
||||||
*%val{select_mode}*::
|
*%val{select_mode}*::
|
||||||
_for commands executed from the object menu's `<a-;>` only_ +
|
_for commands executed from the object menu's `<a-;>` only_ +
|
||||||
|
|
|
@ -138,6 +138,9 @@ inline void write_stderr(StringView str) { try { write(STDERR_FILENO, str); } ca
|
||||||
|
|
||||||
String runtime_directory()
|
String runtime_directory()
|
||||||
{
|
{
|
||||||
|
if (const char* runtime_directory = getenv("KAKOUNE_RUNTIME"))
|
||||||
|
return runtime_directory;
|
||||||
|
|
||||||
char relpath[PATH_MAX+1];
|
char relpath[PATH_MAX+1];
|
||||||
format_to(relpath, "{}../share/kak", split_path(get_kak_binary_path()).first);
|
format_to(relpath, "{}../share/kak", split_path(get_kak_binary_path()).first);
|
||||||
struct stat st;
|
struct stat st;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user