added status for loaded ssh keys
This commit is contained in:
@@ -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"
|
||||
|
Reference in New Issue
Block a user