git prompt details implemented
This commit is contained in:
parent
117730b82c
commit
af0d0bd59c
@ -30,9 +30,14 @@ configure_prompt() {
|
||||
[ "$EUID" -eq 0 ] && prompt_symbol='%F{white}☠%B%F{%(#.red.blue)}'
|
||||
case "$PROMPT_ALTERNATIVE" in
|
||||
twoline)
|
||||
PROMPT=$'%F{%(#.blue.green)}┌──${debian_chroot:+($debian_chroot)─}${VIRTUAL_ENV:+($(basename $VIRTUAL_ENV))─}(%B%F{%(#.red.blue)}%n'$prompt_symbol$'%m%b%F{%(#.blue.green)})-[%B%F{reset}%(6~.%-1~/…/%4~.%5~)%b%F{%(#.blue.green)}]\n`giti -n`%F{%(#.blue.green)}└─%B%(#.%F{red}#.%F{blue}$)%b%F{reset} '
|
||||
export GIT_PROMPT_DETAILS="off"
|
||||
PROMPT=$'%F{%(#.blue.green)}┌──${debian_chroot:+($debian_chroot)─}${VIRTUAL_ENV:+($(basename $VIRTUAL_ENV))─}(%B%F{%(#.red.blue)}%n'$prompt_symbol$'%m%b%F{%(#.blue.green)})-[%B%F{reset}%(6~.%-1~/…/%4~.%5~)%b%F{%(#.blue.green)}]\n`giti -p`%F{%(#.blue.green)}└─%B%(#.%F{red}#.%F{blue}$)%b%F{reset} '
|
||||
# Right-side prompt with exit codes and background processes
|
||||
RPROMPT=$'%(?.. %? %F{red}%B⚡%b%F{reset})%(1j. %j %F{yellow}%B⚙%b%F{reset}.)'
|
||||
# Add mechanism to switch git details for prompt
|
||||
gitp() {
|
||||
[[ "$GIT_PROMPT_DETAILS" == "on" ]] && export GIT_PROMPT_DETAILS="off" || export GIT_PROMPT_DETAILS="on"
|
||||
}
|
||||
;;
|
||||
oneline)
|
||||
PROMPT=$'${debian_chroot:+($debian_chroot)}${VIRTUAL_ENV:+($(basename $VIRTUAL_ENV))}%B%F{%(#.red.blue)}%n@%m%b%F{reset}:%B%F{%(#.blue.green)}%~%b%F{reset}%(#.#.$) '
|
||||
|
2
bin
2
bin
@ -1 +1 @@
|
||||
Subproject commit bb3fb18730e1579db828f574d85e0d6ca18d8039
|
||||
Subproject commit 7354bb9e3a2555bd95d67480846cfadcac009059
|
Loading…
x
Reference in New Issue
Block a user