Environment variables
The environment variables that usql v0.19.13-0.20261129074835-be3acfadfc0c reads, as \? variables lists them. Set one before the command, as USQL_PAGER=less usql. A row that names more than one variable gives them in the order that usql reads them: the first one that is set wins.
The environment of the programs that usql runs, such as the pager and the editor, is a section of the configuration. See the section env.
| Variable | Description |
|---|---|
USQL_CONFIG | config file path (default config.yaml in the configuration directory) |
USQL_DSN | DSN to open when the command line names none, removed from the environment after it is read |
USQL_EDITOREDITORVISUAL | editor used by the \e, \ef, and \ev commands |
USQL_EDITOR_LINENUMBER_ARG | how to specify a line number when invoking the editor |
USQL_HISTORY | path of the history file (default the history file in the state directory) |
USQL_PAGERPAGER | name of external pager program |
USQL_SHOW_HOST_INFORMATION | display host information when connecting to a database |
USQLRC | path of the file that runs at start (default init.sql in the config directory) |
USQL_SSLMODESSLMODE | when set to 'retry', allows connections to attempt to reconnect when no ?sslmode= was specified on the url |
USQL_TERM_GRAPHICSTERM_GRAPHICS | use the specified terminal graphics |
USQL_SHELLSHELL | shell that runs the \! command, a backtick, \g |command, \o |command, the pager and the editor |