Updated comments.
This commit is contained in:
parent
6b794373f2
commit
4e5fee870f
3 changed files with 2 additions and 5 deletions
|
@ -17,7 +17,7 @@ hash ssh-add ssh-agent >/dev/null 2>&1 && {
|
|||
# Determine the platform we're on.
|
||||
_PLATFORM="$(uname -s)"
|
||||
|
||||
# Remove the SSH_AUTH_SOCK from the agents file.
|
||||
# Remove the $SSH_AUTH_SOCK from the agents file.
|
||||
[[ ! -z "$SSH_AUTH_SOCK" ]] && (( ${_SSH_AGENT_REG_FAILED:-0} == 0 )) && {
|
||||
_lock_agents_file && {
|
||||
_pop_agent_sock || {
|
||||
|
|
|
@ -34,10 +34,6 @@ fi
|
|||
[[ -d "$HOME/.local/bin" ]] && export PATH="$HOME/.local/bin:$PATH"
|
||||
[[ -d "$HOME/bin" ]] && export PATH="$HOME/bin:$PATH"
|
||||
|
||||
#When registration of connection fails, set a marker in .bash_profile.
|
||||
#Check for that marker in .bash_logout and don't remove socket from agents file - would be removing
|
||||
#another shells socket. Will need to clear the marker if subsequently (from prompt_command) find a new socket and reg it.
|
||||
|
||||
# Make ssh-agent work better.
|
||||
hash ssh-add ssh-agent >/dev/null 2>&1 && {
|
||||
if [[ -e "$SSH_AUTH_SOCK" ]]; then
|
||||
|
|
1
.bashrc
1
.bashrc
|
@ -24,6 +24,7 @@ _agent_prompt_command() {
|
|||
_unlock_agents_file
|
||||
_SSH_PROMPT_ERROR_ISSUED=0
|
||||
else
|
||||
# Failed to find a new socket.
|
||||
if [[ -z "$(egrep -v '^$' ~/.ssh/agents)" ]]; then
|
||||
((${_SSH_PROMPT_ERROR_ISSUED:-0} == 0)) && {
|
||||
echo "$(tput setaf 1)Lost connection to ssh-agent - no alternate available!$(tput op)"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue