diff --git a/.config/shell/init_dotfiles.sh b/.config/shell/init_dotfiles.sh index e42fd97..073f108 100755 --- a/.config/shell/init_dotfiles.sh +++ b/.config/shell/init_dotfiles.sh @@ -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"/{} diff --git a/.profile b/.profile index 677310a..2681a9a 100644 --- a/.profile +++ b/.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 diff --git a/.psqlrc b/.psqlrc new file mode 100644 index 0000000..af0d26d --- /dev/null +++ b/.psqlrc @@ -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