added status for loaded ssh keys

This commit is contained in:
Jonas Forsberg
2021-12-14 08:55:35 +01:00
parent 4b82d2b12e
commit 0df9818314
2 changed files with 6 additions and 11 deletions

View File

@@ -33,6 +33,7 @@ function bash_ps1 () {
local PS1_COLOR_TODO="${PS1_COLOR_TODO:-\[\033[1;30m\]\[\033[43m\]}"
local PS1_COLOR_DOTF="${PS1_COLOR_DOTF:-\[\033[1;37m\]\[\033[45m\]}"
local PS1_COLOR_PASS="${PS1_COLOR_PASS:-\[\033[0;30m\]\[\033[47m\]}"
local PS1_COLOR_SSH="${PS1_COLOR_SSH:-\[\033[0;37m\]\[\033[44m\]}"
local CURRENT_CONTEXT=""
@@ -72,6 +73,11 @@ function bash_ps1 () {
fi
fi
if type -t ssh-add > /dev/null;then
if [[ "$(ssh-add -L | grep -E -c '^ssh')" == "0" ]];then
STATUS="${STATUS}${PS1_COLOR_SSH}s"
fi
fi
if [[ $(type -t todo_status) == function ]] && [[ "$(todo_status)" == "YES" ]];then
STATUS="${STATUS}${PS1_COLOR_TODO}T"