Expand description
Suspend/resume subprocess execution.
Implements the suspend/resume sequence from the architecture doc §3:
- Leave alternate screen and restore cooked terminal mode.
- Spawn the subprocess with inherited stdio, relative to
cwd. - Wait for the subprocess to exit.
- Re-enter raw mode and the alternate screen.
- Signal the caller that a full redraw is required (the subprocess may have overwritten the terminal).
The same path serves both “open in configured editor” and Command Mode’s
!<shell command> — the only difference is the argv passed in.
For the command forms that need an interpreter (!<command> and :git),
shell_argv builds that argv from the [general] shell config key, so
which shell runs them is the user’s choice rather than a compile-time
constant.
Enums§
- Shell
Exec Error - Errors that can arise while running an external process.
- Shell
Pause - When Trail prints the result block and waits for a key before reclaiming the screen from a command.
Constants§
- DEFAULT_
SHELL_ ARGV - Interpreter used for
!<command>and:gitwhen[general] shellis blank.
Functions§
- run_
external - Leaves the alternate screen, runs
argvincwd, then restores the TUI. - shell_
argv - Builds the argv that runs
commandthrough the shell named byspec. - split_
shell_ spec - Splits a
[general] shellspec into the argv prefix it stands for.