Skip to content

Instantly share code, notes, and snippets.

@josh-works
Last active April 22, 2017 03:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save josh-works/0784dcf6d90a3e515bad137d3661300e to your computer and use it in GitHub Desktop.
Save josh-works/0784dcf6d90a3e515bad137d3661300e to your computer and use it in GitHub Desktop.

in .psqlrc, I've got:

\set PROMPT1 '\n%[%033[1;31;40m%] ➤ %[%033[32m%]psql%033[36m%]%/ %[%033[K%]%[%033[0m%]\n\n%[%033[1;33m%]%#%[%033[0m%] '
\set PROMPT2 '%[%033[1;33m%]%##%[%033[0m%] '
\timing
\set HISTSIZE 2000


\set alldata 'SELECT * FROM '

here's a wordier option for PROMPT1, if you want:

\set PROMPT1 '\n%[%033[1;31;40m%] ➤ %[%033[32m%]psql:%[%033[36m%]//%n%[%033[34m%]@%[%033[36m%]%`hostname`:%>%[%033[33m%]/%/ %[%033[K%]%[%033[0m%]\n\n%[%033[1;33m%]%#%[%033[0m%] '

My prompt looks like:

prompt_goodies

Further reading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment