add token to bash_completion

This commit is contained in:
Jakobus Schürz 2020-09-24 13:15:16 +02:00
parent e36adb3c71
commit ef27674c4e
2 changed files with 5 additions and 5 deletions

View file

@ -10,5 +10,5 @@ function _sshidentities() {
COMPREPLY=( $(compgen -W "${KEYS}" -- ${CUR}) )
return 0
}
complete -F _sshidentities startagent loadagent
complete -F _sshidentities startagent loadagent token

View file

@ -134,14 +134,14 @@ agent-start-or-restart () {
logwarn "$msg"
;;
2)
loginfo "former agent is not running" >&2
loginfo "former agent is not running -> start it" >&2
[ -e $agentsocket ] && { logdebug -n "remove socketfile: $( rm -v "$agentsocket" )"; }
logdebug "$(ssh-agent -a $agentsocket ${SSH_AGENT_OPTIONS} > $agentfile )"
loginfo "agent started" >&2
;;
esac
else
loginfo "agent did not exist" >&2
loginfo "agent did not exist -> create it" >&2
#rm "$agentsocket"
logdebug "ssh-agent -a $agentsocket \> $agentfile"
logdebug "$(ssh-agent -a $agentsocket $SSH_AGENT_OPTIONS > $agentfile )"
@ -149,12 +149,12 @@ agent-start-or-restart () {
fi
fi
logdebug "agent for $ssh_identity: $agentfile"
logdebug "ssh-agent for identity »$ssh_identity«: $agentfile"
$createonly && logdebug "current loaded keys: $(ssh-runinagent $agentfile ssh-add -l)"
echo $agentfile
ret=0
else
logwarn "ssh-identity $ssh_identity is not configured. Please create $identitydir and add keys"
logwarn "ssh-identity »$ssh_identity« is not configured. Please create $identitydir and add keys"
ret=2
fi