]> git.sev.monster Git - dotfiles.git/commitdiff
small fixes
authorsev <git@sev.monster>
Sun, 23 Jul 2023 18:11:20 +0000 (13:11 -0500)
committersev <git@sev.monster>
Fri, 5 Apr 2024 21:27:40 +0000 (16:27 -0500)
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

base/.zshenv
etc/zsh/.zprofile
etc/zsh/.zshrc

index 90ec4cab246508429982add5421f6fad65538b6a..f6f0646c6db203ff132321249de281e916c87ad6 100644 (file)
@@ -25,7 +25,7 @@ if [[ ! -v _sev_first_display && ( -v DISPLAY || -v WAYLAND_DISPLAY ) ]] {
     #      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
 }
index 3bad054a234e018cfe9dff8511ab32bcc9f05301..9b93f41e22f8e4c97edcb52951fd6bd432fa7107 100644 (file)
@@ -346,8 +346,9 @@ if [[ -v commands[gpg-connect-agent] &&
                   ${+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} {
index dd7d2ddbc0fc77fb5886cdb892e45cd4accb1efb..5b9c79a1b8ede832ea13b4ab1c3d109366183fc6 100644 (file)
@@ -308,6 +308,7 @@ autoload -Uz compinit
 cache=${XDG_CACHE_HOME:-~/.cache}/zsh
 [[ -d $cache ]] || mkdir -p $cache
 compinit -d $cache/.zcompdump
+unset cache
 
 ### prompt
 autoload -Uz promptinit && promptinit
This page took 0.044646 seconds and 4 git commands to generate.