zsh: add pash config and wrapper

pull/1/head
earnest ma 2021-12-27 21:18:49 -05:00
parent f3eeab9d9c
commit ec1c36ac61
Signed by: earnest ma
GPG Key ID: A343F43342EB6E2A
1 changed files with 22 additions and 0 deletions

View File

@ -68,6 +68,28 @@ if [[ "$HOST" == core.envs.net ]]; then
export GPG_TTY=$(tty)
fi
# pash configuration
export PASH_KEYID=BF66E5C8A1416E2A857C774CA343F43342EB6E2A
pash() {
case $1 in
g*) # git, not using atm
cd "${PASH_DIR:=${XDG_DATA_HOME:=$HOME/.local/share}/pash}"
shift
git "$@"
;;
sync) # uses rsync, will overwrite to match local
cd "${PASH_DIR:=${XDG_DATA_HOME:=$HOME/.local/share}/pash}"
shift; send_host="$1"; shift
[ -z "$send_host" ] && echo "No destination provided" || \
rsync -ravz --delete . \
"${send_host}:${PASH_DIR:=${XDG_DATA_HOME:=$HOME/.local/share}/pash}" "$@"
;;
*)
command pash "$@"
;;
esac
}
# PLUGINS!
# `miniplug update`