zsh
- detect Termux env and skip pointless zprofile early load
- don't show error on gpg setup if gpg-agent.conf doesnt exist
- remove temp var from env
# display manager or launcher in front of it
export _sev_first_display=
_sev_refresh_gpgagent= source ${ZDOTDIR:-~}/.zprofile
-} elif [[ ! -o login && $SHLVL == 1 ]] {
+} elif [[ ! -o login && $SHLVL -eq 1 && ${+TERMUX_VERSION} -eq 0 ]] {
### early zprofile sourcing for first shell even if not a login shell
source ${ZDOTDIR:-~}/.zprofile
}
${+DISPLAY} + ${+WAYLAND_DISPLAY} == 0))
# XXX: don't know if gpg-agent supports comments after directives
# XXX: path could have #
+ # XXX: we are assuming this is our pinentry from .local/bin
sed -Ei 's#^([[:space:]]*pinentry-program[[:space:]]).*$#\1'${commands[pinentry]:-/dev/null}'#' \
- ${GNUPGHOME:-~/.gnupg}/gpg-agent.conf
+ ${GNUPGHOME:-~/.gnupg}/gpg-agent.conf 2>/dev/null
# XXX: could check for changes before doing this to save perf
gpg-connect-agent RELOADAGENT UPDATESTARTUPTTY /bye >/dev/null 2>&1
if {$p} {
cache=${XDG_CACHE_HOME:-~/.cache}/zsh
[[ -d $cache ]] || mkdir -p $cache
compinit -d $cache/.zcompdump
+unset cache
### prompt
autoload -Uz promptinit && promptinit