Skip to main content

capture

Function capture 

Source
pub fn capture(prompt: &str) -> Result<Option<String>>
Expand description

Open the best available editor with comment-prompt instructions.

Uses Git’s editor resolution order:

  1. $GIT_EDITOR
  2. git config core.editor
  3. $VISUAL
  4. $EDITOR
  5. Built-in TUI editor

prompt lines are prefixed with # and stripped from the result. Returns Some(content) on save, None if cancelled or empty.