Edit a string with the users preferred text editor using $VISUAL or $ENVIRONMENT
79
Utility that opens the user's editor on a temporary draft file whose name, location, and permissions can be customized, then returns the saved text.
X. @test0o600 is supplied, the temporary file is created with that permission mask and is removed after the editor closes. @test@generates
export function openDraft(initialText?: string, options?: {
prefix?: string;
postfix?: string;
dir?: string;
template?: string;
mode?: number;
}): { content: string; filePath: string; lastExitStatus: number | null; };
export function openDraftAsync(
initialText?: string,
options?: {
prefix?: string;
postfix?: string;
dir?: string;
template?: string;
mode?: number;
},
callback: (err: Error | null, result?: { content: string; filePath: string; lastExitStatus: number | null; }) => void
): void;Provides editor-driven workflows backed by configurable temporary files. @satisfied-by
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