mirror of
https://github.com/robbyrussell/oh-my-zsh.git
synced 2026-01-06 02:24:47 +01:00
feat(agnoster): add VRF name to prompt if available
This commit is contained in:
@@ -241,12 +241,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
|
||||||
|
|||||||
Reference in New Issue
Block a user