Add config for psql
This commit is contained in:
parent
c5cf44f72e
commit
c1393d0756
3 changed files with 33 additions and 1 deletions
|
@ -20,7 +20,7 @@ git clone --bare git@git.webartifex.biz:alexander/dotfiles.git "$HOME/.dotfiles"
|
|||
|
||||
# Backup old dotfiles
|
||||
rm -rf "$HOME/.dotfiles.bak" >/dev/null
|
||||
mkdir -p $HOME/.dotfiles.bak/.config/{bat,flameshot,git,Nextcloud,pop-system-updater,shell} && \
|
||||
mkdir -p $HOME/.dotfiles.bak/.config/{bat,flameshot,git,Nextcloud,pop-system-updater,psql,shell} && \
|
||||
/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME checkout 2>&1 | egrep "\s+\." | awk {'print $1'} | \
|
||||
xargs -I{} mv {} "$HOME/.dotfiles.bak"/{}
|
||||
|
||||
|
|
2
.profile
2
.profile
|
@ -34,6 +34,8 @@ export BAT_CONFIG_PATH="$HOME/.config/bat/config"
|
|||
|
||||
export LESSHISTFILE="${XDG_CACHE_HOME:-$HOME/.cache}/.lesshst"
|
||||
|
||||
export PSQLRC="$HOME/.psqlrc"
|
||||
|
||||
|
||||
# Shell-specific stuff
|
||||
|
||||
|
|
30
.psqlrc
Normal file
30
.psqlrc
Normal file
|
@ -0,0 +1,30 @@
|
|||
-- `psql` executes the commands in this `~/.psqlrc` creating output
|
||||
-- (this flag hides that and is unset again at the bottom)
|
||||
\set QUIET 1
|
||||
|
||||
-- Show verbose error messages
|
||||
\set VERBOSITY verbose
|
||||
|
||||
-- Use normal "table" format by default and "expanded table" with lots of columns
|
||||
\x auto
|
||||
|
||||
-- By default, NULLs show up as empty spaces, which looks like empty strings
|
||||
\pset null 'NULL'
|
||||
|
||||
-- Ignore errors in interactive sessions but not when executing scripts
|
||||
\set ON_ERROR_ROLLBACK interactive
|
||||
|
||||
-- Upper case SQL keywords
|
||||
\set COMP_KEYWORD_CASE upper
|
||||
|
||||
-- Use the best text editor in the world
|
||||
\set EDITOR vi
|
||||
|
||||
-- Don't store the same SQL statement repeatedly
|
||||
\set HISTCONTROL ignoredups
|
||||
|
||||
-- Make all queries display query times
|
||||
\timing
|
||||
|
||||
-- Unset the flag set at the top of this file
|
||||
\unset QUIET
|
Loading…
Reference in a new issue