]> git.sev.monster Git - dotfiles.git/commitdiff
zprofile: remove unnecessary variable
authorsev <git@sev.monster>
Sun, 25 Sep 2022 12:14:40 +0000 (07:14 -0500)
committersev <git@sev.monster>
Fri, 5 Apr 2024 21:27:40 +0000 (16:27 -0500)
base/.zprofile

index 9179bcb2449c0a5c7a0161dd9770454e7ace7fbb..2a26dbb161158058f983cb6e162b8677b04770d4 100644 (file)
@@ -330,8 +330,7 @@ if [[ ! -v _sev_setup_ssh ]] {
     if [[ ! -v SSH_AUTH_SOCK && ( -v commands[okc-ssh-agent] ||
           ( -v commands[ssh-agent] && ! -v commands[gpg] ) ) ]] {
         okc=${commands[okc-ssh-agent]:+okc-}
     if [[ ! -v SSH_AUTH_SOCK && ( -v commands[okc-ssh-agent] ||
           ( -v commands[ssh-agent] && ! -v commands[gpg] ) ) ]] {
         okc=${commands[okc-ssh-agent]:+okc-}
-        t=${_sev_tmp:-${TMPDIR:-${TEMP:-${TMP:-/tmp}}}}
-        e=$t/${okc}ssh-agent-exports
+        e=$_sev_tmp/${okc}ssh-agent-exports
         typeset sock=
         typeset -i pid=
         if [[ -f $e ]] {
         typeset sock=
         typeset -i pid=
         if [[ -f $e ]] {
@@ -342,20 +341,21 @@ if [[ ! -v _sev_setup_ssh ]] {
             export SSH_AUTH_SOCK=$sock
             export SSH_AGENT_PID=$pid
         else
             export SSH_AUTH_SOCK=$sock
             export SSH_AGENT_PID=$pid
         else
-            e='TMPDIR=$t ${okc}ssh-agent'
             # TODO: ensure ssh-agent path looks legit to avoid unsafe eval?
             # XXX: doesn't appear to be any other way to handle redirection.
             #      because eval needs to write to current scope environment
             #      subshells can't be used to capture output and print.
             # TODO: ensure ssh-agent path looks legit to avoid unsafe eval?
             # XXX: doesn't appear to be any other way to handle redirection.
             #      because eval needs to write to current scope environment
             #      subshells can't be used to capture output and print.
+            c='TMPDIR=$_sev_tmp ${okc}ssh-agent'
             if [[ -o interactive ]] {
             if [[ -o interactive ]] {
-                eval $(eval $=e)
+                eval $(eval $=c)
                 print -nP '%f'
             } else {
                 print -nP '%f'
             } else {
-                eval $(eval $=e) >/dev/null 2>&1
+                eval $(eval $=c) >/dev/null 2>&1
             }
             echo -n $SSH_AUTH_SOCK$'\0'$SSH_AGENT_PID >!$e
             }
             echo -n $SSH_AUTH_SOCK$'\0'$SSH_AGENT_PID >!$e
+            unset c
         fi
         fi
-        unset okc e sock pid
+        unset okc e sock pid
     } elif [[ ! -v SSH_AUTH_SOCK && -v commands[gpg] ]] {
         # since gpg should have been started above, just export and notify
         if [[ -o interactive ]] {
     } elif [[ ! -v SSH_AUTH_SOCK && -v commands[gpg] ]] {
         # since gpg should have been started above, just export and notify
         if [[ -o interactive ]] {
This page took 0.033123 seconds and 4 git commands to generate.