Skip to main content

default_clink_lua_install_path

Function default_clink_lua_install_path 

Source
pub fn default_clink_lua_install_path() -> PathBuf
Expand description

Where runex init clink writes the lua integration script.

Resolution order (first match wins):

  1. RUNEX_CLINK_LUA_PATH env — explicit override for non-standard clink installations or for testing.
  2. %LOCALAPPDATA%\clink\runex.lua — clink’s default state directory on Windows. This is what clink info reports as the scripts dir.
  3. ~/.local/share/clink/runex.lua — POSIX-style fallback for the Linux clink fork (rare, included for completeness).

We deliberately do not shell out to clink info to discover the scripts directory: that would invert the dependency direction (Rust → shell tool) for one path lookup, and the env-var override already lets users with non-standard installs cope.