editor

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package editor resolves and launches the user's text editor — the shared contract behind the CLI's `task edit` and the TUI's `E` (open in $EDITOR), so the two faces pick the same editor and split its command the same way.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Command

func Command(prog, path string) *exec.Cmd

Command builds the *exec.Cmd that opens path in prog, splitting prog on spaces so a multi-word editor ("code -w", "emacsclient -nw") keeps its flags. The caller wires up stdio — the CLI sets it on the returned cmd; the TUI hands the cmd to tea.ExecProcess, which inherits the terminal. A blank prog falls back to Resolve so a caller can't build an empty command.

func Resolve

func Resolve() string

Resolve picks the editor the way every unix tool does: $VISUAL, then $EDITOR, then vi as the last-resort default. Always returns a non-empty program.

Types

This section is empty.

Jump to

Keyboard shortcuts

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