Skip to main content

resolve_root_for_completion

Function resolve_root_for_completion 

Source
pub fn resolve_root_for_completion() -> PathBuf
Expand description

Resolve the root directory to use during a completion invocation.

Tries, in order:

  1. --root <value> extracted from COMP_LINE (bash/zsh).
  2. --root <value> extracted from the process argv after the -- separator (covers fish and other shells that pass words as argv).
  3. AGENT_EXEC_ROOT environment variable (via resolve_root(None)).
  4. XDG / platform default (via resolve_root(None)).