Command line editing
vsql supports the tecla library for line editing and retrieval. You can define a tecla configuration with the following files:
-
~/.vsqlrc(user) -
/opt/vertica/config/vsqlrc(global)
For details, see the tecla documentation.
Command history is automatically saved in ~/.vsql_history when vsql exits and is reloaded when vsql starts.
Disabling tab completion
To disable tab completion, add the following to .vsqlrc:
\bind ^I
Key bindings
Key bindings are read from a global configuration at /opt/vertica/config/vsqlrc, if present. To override key bindings, add definitions to ~/.vsqlrc.
Key bindings must be prefixed with a backslash (\). For example, the following definition binds the "backward-word" action to Ctrl+B:
\bind ^B backward-word
The following key bindings are specific to vsql:
-
Insertswitches between insert mode (the default) and overwrite mode. -
Deletedeletes the character to the right of the cursor. -
Homemoves the cursor to the front of the line. -
Endmoves the cursor to the end of the line. -
^RPerforms a history backwards search.
Implementation differences
The vsql implementation of the tecla library deviates from the tecla documentation in the following ways:
-
Unlike the standard tecla library, which saves all executed lines in the command history,
vsqlonly saves unique non-empty lines. -
vsqlstandardizes the name and location of the history file (~/.vsql_history). -
vsqldoes not support 8-bit meta characters. This can affect international character sets, meta keys, and locales. You can verify that a meta character sends an escape by setting theEightBitInput Xresource toFalse. You can do this in the following ways:-
Add the following to
~/.Xdefaults:XTerm*EightBitInput: False -
Start an
xtermsession with the-xrm '*EightBitInput: False'.
-