From: Ian Langworth <ian.langworth@gmail.com>
To: Wayne Davison <wayned@users.sourceforge.net>
Cc: zsh-users@sunsite.dk
Subject: Re: Is zsh buggy in connection with screen?
Date: Tue, 8 Nov 2005 17:09:42 -0500 [thread overview]
Message-ID: <b6c719b90511081409w67ff0910o941c21d63f8d2126@mail.gmail.com> (raw)
In-Reply-To: <20051108174411.GH24349@dot.blorf.net>
I have a similar problem with ssh-agent. New screen windows
automatically get the updated environment when I've shelled freshly
into the machine, but existing shells in windows need to run
"latestssh."
# the problem with screen is that old sessions lose ssh-agent awareness. this
# little system fixes it.
local agentdir=~/.latestssh
local agentfile=$agentdir/$HOST.sh
mkdir -p $agentdir
chmod 0700 $agentdir >/dev/null
if [ -n "$SSH_AUTH_SOCK" -a -z $STY ]; then
echo "export SSH_AUTH_SOCK=$SSH_AUTH_SOCK" >$agentfile
chmod 0600 $agentfile >/dev/null
fi
# ...existing windows can run this alias
alias latestssh="source $agentfile; ls \$SSH_AUTH_SOCK"
# ...new windows get it automatically
if [ -n "$STY" ]; then
source $agentfile
fi
--
Ian Langworth
next prev parent reply other threads:[~2005-11-08 22:10 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-08 13:02 Sebastian Stein
2005-11-08 14:13 ` Vincent Lefevre
2005-11-08 17:44 ` Wayne Davison
2005-11-08 18:05 ` Wayne Davison
2005-11-08 18:16 ` Sebastian Stein
2005-11-08 18:44 ` Wayne Davison
2005-11-08 20:06 ` Paul Johnson
2005-11-08 22:34 ` Wayne Davison
2005-11-08 18:11 ` Sebastian Stein
2005-11-08 19:34 ` Tobias Gruetzmacher
2005-11-08 22:09 ` Ian Langworth [this message]
2005-11-22 9:47 ` Vincent Lefevre
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=b6c719b90511081409w67ff0910o941c21d63f8d2126@mail.gmail.com \
--to=ian.langworth@gmail.com \
--cc=wayned@users.sourceforge.net \
--cc=zsh-users@sunsite.dk \
/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).