Skip to content

Instantly share code, notes, and snippets.

@datfooldive
Created November 22, 2025 15:56
Show Gist options
  • Select an option

  • Save datfooldive/541ef24e35e555b198d5446ed64137d7 to your computer and use it in GitHub Desktop.

Select an option

Save datfooldive/541ef24e35e555b198d5446ed64137d7 to your computer and use it in GitHub Desktop.
_prompt_agnoster_status() {
local segment=
(( RETVAL )) && segment+=" %F{red}${RETVAL}"
(( EUID == 0 )) && segment+=" %F{yellow}⚡"
(( ${#jobstates} )) && segment+=" %F{cyan}⚙"
if [[ -n ${VIRTUAL_ENV_PROMPT} ]]; then
segment+=" %F{cyan}${VIRTUAL_ENV_PROMPT}"
elif [[ -n ${VIRTUAL_ENV} ]]; then
segment+=" %F{cyan}${VIRTUAL_ENV:t}"
fi
segment+=" %F{%(!.yellow.default)}%n@%m"
if [[ -n ${segment} ]]; then
_prompt_agnoster_segment black "${segment} "
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment