Edit a string with the users preferred text editor using $VISUAL or $ENVIRONMENT
79
Captures text from a user-invoked external editor, returning both the saved content and the editor's exit status without treating non-zero exits as fatal.
@generates
The returned exitStatus should mirror the editor process exit code; use null only when no code is available.
export interface EditorResult {
text: string;
exitStatus: number | null;
}
export interface EditorOptions {
initialText?: string;
}
export function runEditorSession(options?: EditorOptions): Promise<EditorResult>;Launches the user's preferred text editor and captures edited file contents.
Install with Tessl CLI
npx tessl i tessl/npm-external-editordocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10