Skip to main content

Module editor

Module editor 

Source
Expand description

Editor resolution + argv parsing.

Precedence ladder (FR-009):

  1. --editor=<cmd> flag (Default mode only); empty value falls through.
  2. $VISUAL
  3. $EDITOR
  4. /usr/bin/editor (Unix only; existence + executable check)
  5. vi (Unix) / notepad.exe (Windows)

Structs§

Resolved
Result of resolving the editor command: the argv to spawn (NOT yet including the tempfile path) plus the resolved source for diagnostics.

Functions§

parse_editor_value
Parse an editor command string into argv using shell-words rules. Returns Error::InvalidEditorCommand(value.to_string()) on parse failure (per FR-010 + STF-003).
resolve
Walk the resolution ladder. Returns the editor argv (without tempfile) and the matched source rung.