]> 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>
Thu, 24 Mar 2022 03:01:27 +0000 (22:01 -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.036483 seconds and 4 git commands to generate.