Sync .bash* with master.

This commit is contained in:
Darren 'Tadgy' Austin 2023-05-21 01:12:44 +01:00
commit 9f90dadbd4
2 changed files with 3 additions and 2 deletions

View file

@ -16,7 +16,7 @@ fi
hash ssh-add ssh-agent >/dev/null 2>&1 && {
# Stop any started ssh-agent as long as the shell level is 1 and we're not on a tty.
(( SHLVL == 1 )) && [[ "$(tty)" == /dev/pts/* ]] && [[ -n "$SSH_AGENT_PID" ]] && {
ssh-agent -k
eval "$(ssh-agent -k)"
(( $? != 0 )) && printf "\\033[1;31;40m%s\\033[0;39m\\n" "Failed to stop ssh-agent." >&2
sleep 5
unset SSH_AGENT_PID SSH_AUTH_SOCK