Skip to main content

Module launch

Module launch 

Source
Expand description

Deciding which external program to start, and with which arguments.

Everything here is pure: the environment the decision depends on comes in as a LaunchEnv, and the result is a CommandSpec describing the process. Spawning it is the app’s job, so the choice of terminal can be tested for any machine without starting anything.

Structs§

CommandSpec
A process to start: program with args, running in cwd.
LaunchEnv
The parts of the environment that decide which terminal to use.

Enums§

EditorLaunch
How to open a file for editing.
LaunchError

Functions§

editor_command
The editor for file: $VISUAL, else $EDITOR, split on whitespace with its arguments ahead of the file. A terminal editor runs in a terminal opened in the file’s directory.
terminal_command
The command that opens a terminal in dir, optionally running run inside it instead of a shell.