Browse Source

git prompt details implemented

master
Dirk Alders 1 year ago
parent
commit
af0d0bd59c
2 changed files with 7 additions and 2 deletions
  1. 6
    1
      .zshrc.d/__available__/prompt_kali.zsh
  2. 1
    1
      bin

+ 6
- 1
.zshrc.d/__available__/prompt_kali.zsh View File

@@ -30,9 +30,14 @@ configure_prompt() {
30 30
     [ "$EUID" -eq 0 ] && prompt_symbol='%F{white}☠%B%F{%(#.red.blue)}'
31 31
     case "$PROMPT_ALTERNATIVE" in
32 32
         twoline)
33
-            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} '
33
+            export GIT_PROMPT_DETAILS="off"
34
+            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} '
34 35
             # Right-side prompt with exit codes and background processes
35 36
             RPROMPT=$'%(?.. %? %F{red}%B⚡%b%F{reset})%(1j. %j %F{yellow}%B⚙%b%F{reset}.)'
37
+            # Add mechanism to switch git details for prompt
38
+            gitp() {
39
+                [[ "$GIT_PROMPT_DETAILS" == "on" ]] && export GIT_PROMPT_DETAILS="off" || export GIT_PROMPT_DETAILS="on"
40
+            }
36 41
             ;;
37 42
         oneline)
38 43
             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}%(#.#.$) '

+ 1
- 1
bin

@@ -1 +1 @@
1
-Subproject commit bb3fb18730e1579db828f574d85e0d6ca18d8039
1
+Subproject commit 7354bb9e3a2555bd95d67480846cfadcac009059

Loading…
Cancel
Save