Fix SSH agent detection
This commit is contained in:
parent
1a2a9054e5
commit
4edb07531c
1 changed files with 12 additions and 4 deletions
|
@ -3,6 +3,11 @@ if [ -n "$_acp_ignore_shrc" ]
|
|||
then
|
||||
return 1
|
||||
fi
|
||||
if [ -n "$_acp_shrc_loaded" ]
|
||||
then
|
||||
return 1
|
||||
fi
|
||||
export _acp_shrc_loaded=1
|
||||
|
||||
case "$-" in
|
||||
*i*)
|
||||
|
@ -152,12 +157,15 @@ fi
|
|||
alias prun='podman run --rm --interactive --tty --security-opt label=disable --volume "$HOME":"$HOME" --volume "$XDG_RUNTIME_DIR":"$XDG_RUNTIME_DIR" --env XDG_RUNTIME_DIR="$XDG_RUNTIME_DIR" --env XDG_SESSION_TYPE=wayland --ipc host'
|
||||
alias pruncerts='prun --volume /etc/pki/ca-trust:/etc/pki/ca-trust:ro --volume /etc/ssl/certs:/etc/ssl/certs:ro'
|
||||
|
||||
if command -v ssh-agent > /dev/null && [ -z "$SSH_AUTH_SOCK" ] && [ -z "$SSH_AGENT_PID" ]
|
||||
if command -v ssh-agent > /dev/null
|
||||
then
|
||||
export SSH_AUTH_SOCK="${SSH_AUTH_SOCK:-$XDG_STATE_HOME/ssh-agent.socket}"
|
||||
export SSH_AGENT_PID="${SSH_AGENT_PID:-$XDG_STATE_HOME/ssh-agent.pid}"
|
||||
if [ ! -S "$SSH_AUTH_SOCK" ]
|
||||
then
|
||||
export SSH_AUTH_SOCK="$XDG_STATE_HOME/ssh-agent.socket"
|
||||
export SSH_AGENT_PID="$XDG_STATE_HOME/ssh-agent.pid"
|
||||
ssh-agent -a "$SSH_AUTH_SOCK"
|
||||
fi
|
||||
fi
|
||||
|
||||
mkcd () {
|
||||
if [ $# -ne 1 ]
|
||||
|
|
Loading…
Reference in a new issue