editor

package
v0.27.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 11, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package editor opens the user's configured text editor on a temporary file and returns the edited content. It is intentionally separate from internal/tui so that callers needing only an editor (not a Bubble Tea UI) don't depend on the heavier TUI package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Open

func Open(initialContent, filenamePattern string) (string, error)

Open opens the user's preferred editor with the given initial content and returns the edited content, or an error.

Editor precedence: GIT_EDITOR > EDITOR > git config core.editor > vi. When no editor is set in the environment, it first checks that interactive use is allowed (so it doesn't hang in CI / non-interactive contexts).

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL