dotfiles/zsh/environment/host/devF/zshrc

29 lines
513 B
Bash
Raw Permalink Normal View History

2024-08-13 18:59:39 +00:00
#!/usr/bin/env zsh
# vim: syn=zsh
#
2022-05-24 18:42:28 +00:00
##### Aliases
2023-05-24 20:13:44 +00:00
db_envs=(
cadev
dcdev
gadev
ildev
indev
mddev
txdev
utdev
vadev
)
# Database Connection
2022-05-24 18:42:28 +00:00
for env in $db_envs ; do
2023-05-24 20:16:24 +00:00
eval "alias psql_$env='psql -d $env -p 5432 -U ${env}_owner'"
2022-05-24 18:42:28 +00:00
if (( $+commands[pgcli] )); then
2023-05-24 20:16:24 +00:00
eval "alias pg_${env}='pgcli -d $env -p 5432 -U ${env}_owner'"
2022-05-24 18:42:28 +00:00
fi
done
# List Databases
2023-05-24 20:16:24 +00:00
alias psql_l="psql -p 5432 -U greenfiling -l"
2022-05-24 18:42:28 +00:00
# Sign-In as limited super user.
2023-05-24 20:16:24 +00:00
alias psql_root="psql -d postgres -p 5432 -U greenfiling"