Skip to main content

Module integration_check

Module integration_check 

Source
Expand description

Health check for the user-side shell-integration scripts.

§Why this module exists

Most shells (bash/zsh/pwsh/nu) source runex export <shell> at every shell start, so they always see the latest integration template — by construction, they cannot drift.

clink is the exception: runex init clink copies the export output into a standalone lua file under clink’s scripts directory. The user has to re-run runex init clink to refresh it. When the integration template changes (and it has — the hook migration rewrote it from the ground up), users with a stale runex.lua silently miss out on the new behavior.

For bash/zsh/pwsh/nu we instead check that the rcfile contains the init marker — i.e. that integration was ever set up at all. That catches “user never ran runex init” but not drift, because drift can’t happen.

Enums§

IntegrationCheck
Outcome of a single integration check, deliberately small so the caller can convert it into a doctor::Check without coupling this module to doctor.

Functions§

check_clink_lua_freshness
Compare the user’s clink integration script against current_export (= what runex export clink produces today).
check_rcfile_marker
Confirm that the rcfile for shell mentions the runex init marker. rcfile_override is for tests; production callers pass None and fall back to crate::init::rc_file_for.
default_clink_lua_paths
Default ordered list of paths to probe for the clink lua file on this platform. Callers may extend or override this list.