-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.psqlrc
44 lines (30 loc) · 958 Bytes
/
.psqlrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
-- almost entirely copied from https://git.io/vxeUB. Thanks, @mitsuhiko!
-- disable output temporarily
\set QUIET on
-- nicer rendering for null
\pset null ¤
-- nicer tables
\pset linestyle unicode
-- enable timers
\timing on
-- disable default pager
\pset pager off
-- automatically switch to \x for large outputs
\x auto
-- nicer prompt
\set PROMPT1 '\n%[%033[0;33;35m%]%n%[%033[0m%]@%[%033[0;33;33m%]%M%[%033[0m%]/%[%033[0;33;32m%]%/%[%033[0m%] %[%033[0;33;36m%]%x%[%033[0m%]\n%R%[%033[0;33;36m%]>%[%033[0m%] '
\set PROMPT2 '%R%[%033[0;33;36m%]>%[%033[0m%] '
-- better errors
\set VERBOSITY verbose
-- keep history per database
\set HISTFILE ~/.cache/psql-history- :DBNAME
-- keep infinite history
\set HISTSIZE -1
-- keep inputs in the history once
\set HISTCONTROL ignoredups
-- always auto complete in lowercase
\set COMP_KEYWORD_CASE lower
-- output back on
\set QUIET off
-- complete keywords to lowercase
\set COMP_KEYWORD_CASE lower