editor

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2026 License: MIT Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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