VSQL_HOME

默认情况下,vsql 程序从用户的主目录读取配置文件。如果这么做不合适,可以通过设置 VSQL_HOME 环境变量来覆盖配置文件位置,而且设置 VSQL_HOME 环境变量时可以不需要修改共享资源。

在以下示例中,vsql 从 /tmp/jsmith 而非 ~ 读取配置信息。

# Make an alternate configuration file in /tmp/jsmith
mkdir -p /tmp/jsmith
echo "\\echo Using VSQLRC in tmp/jsmith" > /tmp/jsmith/.vsqlrc
# Note that nothing is echoed when invoked normally
vsql
# Note that the .vsqlrc is read and the following is
# displayed before the vsql prompt
#
# Using VSQLRC in tmp/jsmith
VSQL_HOME=/tmp/jsmith vsql