/** * @license * Copyright 2025 Steven Roussey * SPDX-License-Identifier: Apache-2.0 */ export type EditInEditorResult = { readonly status: "saved"; readonly content: string; } | { readonly status: "unchanged"; } | { readonly status: "editor_error"; readonly message: string; }; export interface ParsedEditorCommand { readonly executable: string; readonly args: readonly string[]; } /** * Shell command prefix for opening a file (same precedence as git: GIT_EDITOR, VISUAL, EDITOR). */ export declare function getEditorCommand(): string; export declare function parseEditorCommand(command: string): ParsedEditorCommand; /** * Writes `initialContent` to a temp file, launches the user's editor, then reads the file back. * Same idea as `git commit`: unchanged buffer ⇒ cancel; non-zero editor exit ⇒ error. */ export declare function editStringInExternalEditor(initialContent: string, tempBasename: string): EditInEditorResult;