diff --git a/zsh/.zshrc b/zsh/.zshrc index 7270a05..5817d93 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -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`