]> git.sev.monster Git - dotfiles.git/commitdiff
fix gpg forward GNUPGHOME reset in cleanup
authorsev <git@sev.monster>
Sun, 20 Mar 2022 05:43:55 +0000 (00:43 -0500)
committersev <git@sev.monster>
Fri, 5 Apr 2024 21:27:40 +0000 (16:27 -0500)
base/.zprofile

index 0d8a1a71f2188cbca93ff4e00310736d731a784f..f611b98542ac58129135c59e6ddd317578f87e6e 100644 (file)
@@ -44,13 +44,8 @@ function _sev_zcleanup {
             }
         }
         # reset GNUPGHOME if we removed our own dir
-        if [[ $GNUPGHOME =~ '/.ssh_forward/\d+/*$' && ! -e $GNUPGHOME ]] {
-            x=$GNUPGHOME
-            [[ -o GLOB_ASSIGN ]]; y=$?
-            setopt GLOB_ASSIGN
-            GNUPGHOME=$GNUPGHOME/../..(:a)
-            (( y != 0 )) && unsetopt GLOB_ASSIGN
-        }
+        if [[ $GNUPGHOME =~ '/.ssh_forward/\d+/*$' && ! -e $GNUPGHOME ]]
+            GNUPGHOME=${GNUPGHOME%$MATCH}
     }
 
     ## tmp
This page took 0.05681 seconds and 4 git commands to generate.