X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=psql%2Fpsqlrc.in;h=23cc2d94354312763ccfdcc74f5bd46929868c95;hb=54e498cc877f4e05b5788b0a886ee02546f41a47;hp=bdf8e13ba93493af6be10917804e1998beba16a5;hpb=5e4f35caea5a091d8683cc18df59c561c3944fd4;p=config%2Fdotfiles.git diff --git a/psql/psqlrc.in b/psql/psqlrc.in index bdf8e13..23cc2d9 100644 --- a/psql/psqlrc.in +++ b/psql/psqlrc.in @@ -34,19 +34,19 @@ -- restart the transaction on a typo in a statement. \set ON_ERROR_ROLLBACK interactive --- Uppercase keywords when completing. Thanks to [1] (read on 2016-08-06). --- [1]: http://phili.pe/posts/postgresql-on-the-command-line/ -\set COMP_KEYWORD_CASE upper - -- "ignorespace ignoredups" \set HISTCONTROL ignoreboth -- Set path to history file and increase it. \set HISTFILE HISTFILE_PATH \set HISTSIZE 100000 --- Add transaction status (%x) to prompt. -\set PROMPT1 '%x%/%R%# ' -\set PROMPT2 :PROMPT1 +-- Add transaction status (%x) to prompt; show database name in bold green. +\set PROMPT1 '%x%[%033[01;32m%]%/%[%033[00m%]%R%# ' +-- Remove database from second prompt to make it easily distinguishable from +-- PROMPT1. +\set PROMPT2 '%x%R%# ' -- But display the normal psql welcome message. \set QUIET off + +-- vim: ft=sql