~hokiegeek/dotfiles

e30a11b20a5b89c00163aa02dd4057434357eb99 — HokieGeek 11 months ago 5fe3bf5
Added a Q&D indicator when within an SSH_AGENT
1 files changed, 5 insertions(+), 1 deletions(-)

M shell-plugins/prompt.zsh
M shell-plugins/prompt.zsh => shell-plugins/prompt.zsh +5 -1
@@ 76,6 76,10 @@ prompt_gotmail() {
    echo -n "✉"
}

prompt_ssh() {
    [ ! -z ${SSH_AGENT_PID+x} ] && echo -n "%{$fg[cyan]%}!%{$reset_color%}"
}

autoload -U promptinit && promptinit
autoload -U colors && colors
setopt prompt_subst


@@ 83,6 87,6 @@ setopt prompt_subst
local last_ret="%(?, ,%{$fg[red]%}•%{$reset_color%})"

# U+256D - ╭ ; U+2570 - ╰  ; U+2574 - ╴
PROMPT='%F{234}╭%f${last_ret}$(prompt_host)$(prompt_pwd)$(prompt_repoInfo)
PROMPT='%F{234}╭%f${last_ret}$(prompt_ssh)$(prompt_host)$(prompt_pwd)$(prompt_repoInfo)
%F{234}╰╴%f$(prompt_jobs)'
# RPROMPT="$(prompt_gotmail)"