X-Git-Url: https://git.sev.monster/~sev/dotfiles.git/blobdiff_plain/29b45f3cd04fe7f94aaebbd99c4bdbb3f23f98f3..ec9f2140efb69f3f9e95b8b2fa3681e3ff07e38b:/etc/zsh/.zprofile diff --git a/etc/zsh/.zprofile b/etc/zsh/.zprofile index 58ebfa1..38b34c5 100644 --- a/etc/zsh/.zprofile +++ b/etc/zsh/.zprofile @@ -71,7 +71,7 @@ if [[ ! -v DBUS_SESSION_BUS_ADDRESS && -v commands[dbus-launch] ]] { # clunky (e.g. asking for password twice) to make it worth it. function _gpg_socketpath { # dirs are percent-encoded: https://stackoverflow.com/a/64312099 - echo ${1//(#b)%([[:xdigit:]](#c2))/${(#):-0x$match[1]}} + echo -E - ${1//(#b)%([[:xdigit:]](#c2))/${(#):-0x$match[1]}} } if [[ ! -v _sev_setup_gpg_forward && -v commands[gpg] ]] { # XXX: assuming /tmp exists and is writable on destination @@ -188,12 +188,13 @@ if [[ ! -v _sev_setup_ssh ]] { # subshells can't be used to capture output and print. c='TMPDIR=$_sev_tmp ${okc}ssh-agent' if [[ -o interactive ]] { + [[ -n $okc ]] && echo -n 'OKC-' eval $(eval $=c) print -nP '%f' } else { eval $(eval $=c) >/dev/null 2>&1 } - echo -n $SSH_AUTH_SOCK$'\0'$SSH_AGENT_PID >!$e + echo -En - $SSH_AUTH_SOCK$'\0'$SSH_AGENT_PID >!$e unset c fi unset okc e sock pid @@ -220,5 +221,8 @@ if [[ ! -v _sev_setup_ssh ]] { } unfunction _gpg_socketpath +### plugins +load-plugins zprofile + ### load site-specific load-site-dotfile zprofile