zsh-users
 help / color / mirror / code / Atom feed
From: Matt Zagrabelny <mzagrabe@d.umn.edu>
To: zsh-users@zsh.org
Subject: callback?
Date: Sun, 1 Nov 2020 20:39:34 -0600	[thread overview]
Message-ID: <CAOLfK3WLVnSrsR4S68Tv2CML33PAPg9oTud0PsVhYx3Q-mesUQ@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 575 bytes --]

Greetings!

I am using tmux with zsh.

I use ssh agent forwarding and I ssh to a remote system that is running
tmux. I then detach from that terminal and my SSH_AUTH_SOCK environment
variable becomes "stale".

I would like to have zsh execute something to refresh the SSH_AUTH_SOCK
environment variable when I "tmux attach" to the aforementioned detached
tmux session.

Does anyone know of a way to register a callback or something for zsh so
when a particular command gets run (in my case, tmux attach) my zsh
environment variable can get updated?

Thanks for the help!

-m

[-- Attachment #2: Type: text/html, Size: 776 bytes --]

             reply	other threads:[~2020-11-02  2:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-02  2:39 Matt Zagrabelny [this message]
2020-11-02  8:52 ` callback? Oliver Kiddle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAOLfK3WLVnSrsR4S68Tv2CML33PAPg9oTud0PsVhYx3Q-mesUQ@mail.gmail.com \
    --to=mzagrabe@d.umn.edu \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).