From 74c337df5db5dedbd8d8404e27164c3ad6f3e5ef Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Wed, 9 Dec 2020 09:13:45 +1100 Subject: Add a libexec/ directory and use it to find the kak command Add that libexec directory to the PATH instead of the current kak binary directory to avoid impacting other commands. The libexec directory currently only contains a symlink back to the Kakoune binary. --- src/shell_manager.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/shell_manager.cc') diff --git a/src/shell_manager.cc b/src/shell_manager.cc index 8d70dd1c..591a708d 100644 --- a/src/shell_manager.cc +++ b/src/shell_manager.cc @@ -72,7 +72,7 @@ ShellManager::ShellManager(ConstArrayView builtin_env_vars) // have access to the kak command regardless of if the user installed it { const char* path = getenv("PATH"); - auto new_path = format("{}:{}", path, split_path(get_kak_binary_path()).first); + auto new_path = format("{}../libexec/kak:{}", split_path(get_kak_binary_path()).first, path); setenv("PATH", new_path.c_str(), 1); } } -- cgit v1.2.3