This commit is contained in:
Pelt10 2025-05-02 07:01:17 +00:00 committed by GitHub
commit c3d8fbc95c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -350,12 +350,25 @@ prompt_aws() {
esac esac
} }
# VRF Profile
# Display current VRF name
prompt_vrf() {
if ((${+commands[ip]} )); then
VRF=$(ip vrf identify)
[[ -z "$VRF" ]] && return
prompt_segment green black "${VRF:gs/%/%%}"
fi
}
## Main prompt ## Main prompt
build_prompt() { build_prompt() {
RETVAL=$? RETVAL=$?
prompt_status prompt_status
prompt_virtualenv prompt_virtualenv
prompt_aws prompt_aws
prompt_vrf
prompt_context prompt_context
prompt_dir prompt_dir
prompt_git prompt_git