Edit a string with the users preferred text editor using $VISUAL or $ENVIRONMENT
79
A utility that opens the user's editor on a temporary file and reports both the edited content and the editor process exit code.
null; after a run it returns the most recent exit status value. @test@generates
export type EditorRunOptions = {
editorCommand?: string;
initialText?: string;
};
export type EditorRunResult = {
content: string;
exitStatus: number | null;
};
export function editOnce(options?: EditorRunOptions): Promise<EditorRunResult>;
export function editOnceSync(options?: EditorRunOptions): EditorRunResult;
export function getLastExitStatus(): number | null;Provides access to the user's preferred text editor and exposes the process exit status.
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