editor

package
v0.1.1 Latest Latest
Warning

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

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

Documentation

Overview

Package editor launches the user's editor on a worktree and immediately forgets about it. flow never closes an editor window — that is the user's job, and an explicit non-goal.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrNotOnPath

type ErrNotOnPath struct {
	Command string
	Err     error
}

ErrNotOnPath reports a missing editor binary. Callers print a warning and carry on: a worktree without an editor window is still useful.

func (*ErrNotOnPath) Error

func (e *ErrNotOnPath) Error() string

func (*ErrNotOnPath) Unwrap

func (e *ErrNotOnPath) Unwrap() error

type Launcher

type Launcher struct {
	Runner flowexec.Runner
	Cfg    config.Editor
}

Launcher spawns the configured editor.

func New

func New(r flowexec.Runner, cfg config.Editor) *Launcher

New returns a Launcher for the configured editor.

func (*Launcher) Args

func (l *Launcher) Args(path string) []string

Args renders the configured argument list with {path} substituted.

func (*Launcher) Open

func (l *Launcher) Open(ctx context.Context, path string) error

Open launches the editor with its working directory set to path.

The spawn is detached — its own session, all three standard streams on /dev/null — so the editor survives flow exiting, and flow never blocks on it or leaves a zombie behind.

Jump to

Keyboard shortcuts

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