mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-27 00:00:08 +00:00
feat(agnoster): add VRF name to prompt if available
This commit is contained in:
parent
3668ec2a82
commit
983ef7c8d1
1 changed files with 13 additions and 0 deletions
|
@ -241,12 +241,25 @@ prompt_aws() {
|
|||
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
|
||||
build_prompt() {
|
||||
RETVAL=$?
|
||||
prompt_status
|
||||
prompt_virtualenv
|
||||
prompt_aws
|
||||
prompt_vrf
|
||||
prompt_context
|
||||
prompt_dir
|
||||
prompt_git
|
||||
|
|
Loading…
Reference in a new issue