edit Text
fun editText(text: String, editor: String? = null, env: Map<String, String> = emptyMap(), requireSave: Boolean = false, extension: String = ".txt"): String?
This blocks until the editor is closed.
Return
The edited text, or null if requireSave is true and the editor was closed without saving.
Parameters
text
The text to edit.
editor
The path to the editor to use. Defaults to automatic detection.
env
Environment variables to forward to the editor.
require Save
If the editor is closed without saving, null will be returned if true, otherwise text will be returned.
extension
The extension of the temporary file that the editor will open. This can affect syntax coloring etc.
Throws
if the editor cannot be opened.