If you have entered a long command in SQLCLI, you can make changes to this command at a later stage by editing the command buffer in an external file.
Further information: Command Buffer
To export the contents of the command buffer to an external file, enter the following command:
\e [<file>]
Enter the complete file path and <file> name.
If you do not specify a file, SQLCLI generates a temporary file.
The system opens the file in an editor. To determine which editor will be used, SQLCLI evaluates the environment variables SQLCLI_EDITOR,EDITOR and VISUAL in succession. If you have not set any of these environment variables, Notepad is used on Microsoft Windows and vi on Linux and Unix. For information on setting environment variables, see your operating system documentation.
Make the desired changes to the file.
Save the file in the editor then close file and editor.
You have changed the contents of the command buffer and can now execute the changed command with the command \g.