如何配置sqlite默认显示标题 [英] How to configure sqlite to display headers by default

查看:396
本文介绍了如何配置sqlite默认显示标题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有什么方法可以配置sqlite3,以便默认显示标题吗?

Is there any way to configure sqlite3 so that the headers will display by default?

我知道我可以使用.headers on打开标题,但每次启动客户端时都必须继续输入,因为该设置不会在会话之间粘连。我希望这些标题永久保存。

I know I can use ".headers on" to turn on headers, but I have to keep typing it every time I launch the client because the setting doesn't stick between sessions. I want the headers to be on permanently.

推荐答案

精简手册

From the fine manual:


INIT FILE

sqlite3读取一个初始化文件来设置交互式环境的配置。
[...]
如果文件〜/ .sqliterc 存在,则首先进行处理。可以在用户的​​主目录中找到,它被读取并处理。它通常只包含元命令。

INIT FILE
sqlite3 reads an initialization file to set the configuration of the interactive environment. [...] If the file ~/.sqliterc exists, it is processed first. can be found in the user's home directory, it is read and processed. It should generally only contain meta-commands.

因此,只需放入一个名为 .sqliterc $ b

So just put a file called .sqliterc in your home directory and put this in it:

.headers ON

这篇关于如何配置sqlite默认显示标题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆