mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-05-22 04:51:12 +02:00
screen-ssh-agent plugin added; to enable the ssh-agent within screen
This commit is contained in:
parent
d848c94804
commit
bd4fc28a3a
2 changed files with 23 additions and 0 deletions
10
plugins/screen-ssh-agent/screen-ssh-agent.zsh
Normal file
10
plugins/screen-ssh-agent/screen-ssh-agent.zsh
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
if [ $SSH_AUTH_SOCK ]; then
|
||||
# set up SSH agent socket symlink
|
||||
export SSH_AUTH_SOCK_LINK="/tmp/ssh-$USER/agent"
|
||||
if ! [ -r $(readlink -m $SSH_AUTH_SOCK_LINK) ] && [ -r $SSH_AUTH_SOCK ]; then
|
||||
mkdir -p "$(dirname $SSH_AUTH_SOCK_LINK)" &&
|
||||
chmod go= "$(dirname $SSH_AUTH_SOCK_LINK)" &&
|
||||
ln -sfn $SSH_AUTH_SOCK $SSH_AUTH_SOCK_LINK
|
||||
fi
|
||||
fi
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue