EDIT
displays a file in the default windows text editor (notepad); with no file name, edits the last SQL query instead
Arguments
file name (optional; edits the last SQL query in Notepad if omitted)
Examples
EDIT c:\temp\query*.sql;
EDIT;
Notes
Opens a file in Notepad: EDIT <fileName> (or ED <fileName>). With no fileName, edits the last SQL query instead: writes it to a temporary .sql file, opens that in Notepad, and on close reads it back and stores its (trimmed) content as the new last query, echoed to the console the same way SHOW QUERY does; it does not execute the query, matching the SQL*Plus EDIT convention already followed by / (re-run the last query) and SHOW QUERY/// (display it) in this codebase: run it afterward with /. Reports "No query in memory" and does nothing if there is no last query yet. This no-argument mode is Windows-only, refusing with an error on any other OS; see docs/TODO.md item 17.
This shells out to notepad.exe - it is Windows-only and always uses Notepad specifically, regardless of what text editor is otherwise configured or set as the OS default. BroadSQL waits for Notepad to close before returning to the prompt - see openInNotepadAndWaitForClose(File) for why that isn't simply a Process.waitFor() on the launched notepad.exe.
Last modified in release 5.1.0.
BroadSQL