...
|
...
|
@@ -3,15 +3,15 @@ colors
|
3
|
3
|
#setopt prompt_subst
|
4
|
4
|
|
5
|
5
|
# Modify the colors and symbols in these variables as desired.
|
6
|
|
-GIT_PROMPT_SYMBOL="%{$fg[blue]%}±"
|
7
|
|
-GIT_PROMPT_PREFIX="%{$fg[green]%}[%{$reset_color%}"
|
8
|
|
-GIT_PROMPT_SUFFIX="%{$fg[green]%}]%{$reset_color%}"
|
9
|
|
-GIT_PROMPT_AHEAD="%{$fg[red]%}ANUM%{$reset_color%}"
|
10
|
|
-GIT_PROMPT_BEHIND="%{$fg[cyan]%}BNUM%{$reset_color%}"
|
11
|
|
-GIT_PROMPT_MERGING="%{$fg[magenta]%}⚡︎%{$reset_color%}"
|
12
|
|
-GIT_PROMPT_UNTRACKED="%{$fg[red]%}●%{$reset_color%}"
|
13
|
|
-GIT_PROMPT_MODIFIED="%{$fg[yellow]%}●%{$reset_color%}"
|
14
|
|
-GIT_PROMPT_STAGED="%{$fg[green]%}●%{$reset_color%}"
|
|
6
|
+GIT_PROMPT_SYMBOL="$fg[blue]±"
|
|
7
|
+GIT_PROMPT_PREFIX="$fg[green][$reset_color"
|
|
8
|
+GIT_PROMPT_SUFFIX="$fg[green]]$reset_color"
|
|
9
|
+GIT_PROMPT_AHEAD="$fg[red]ANUM$reset_color"
|
|
10
|
+GIT_PROMPT_BEHIND="$fg[cyan]BNUM$reset_color"
|
|
11
|
+GIT_PROMPT_MERGING="$fg[magenta]Z$reset_color"
|
|
12
|
+GIT_PROMPT_UNTRACKED="$fg[red]●$reset_color"
|
|
13
|
+GIT_PROMPT_MODIFIED="$fg[yellow]●$reset_color"
|
|
14
|
+GIT_PROMPT_STAGED="$fg[green]●$reset_color"
|
15
|
15
|
|
16
|
16
|
# Show Git branch/tag, or name-rev if on detached head
|
17
|
17
|
parse_git_branch() {
|
...
|
...
|
@@ -58,7 +58,7 @@ parse_git_state() {
|
58
|
58
|
# If inside a Git repository, print its branch and state
|
59
|
59
|
git_prompt_string() {
|
60
|
60
|
local git_where="$(parse_git_branch)"
|
61
|
|
- [ -n "$git_where" ] && echo "$GIT_PROMPT_SYMBOL$(parse_git_state)$GIT_PROMPT_PREFIX%{$fg[yellow]%}${git_where#(refs/heads/|tags/)}$GIT_PROMPT_SUFFIX"
|
|
61
|
+ [ -n "$git_where" ] && echo "$GIT_PROMPT_SYMBOL$(parse_git_state)$GIT_PROMPT_PREFIX$fg[yellow]${git_where#(refs/heads/|tags/)}$GIT_PROMPT_SUFFIX "
|
62
|
62
|
}
|
63
|
63
|
|
64
|
64
|
precmd () {
|
...
|
...
|
@@ -75,7 +75,7 @@ precmd () {
|
75
|
75
|
elif [ $nbrj -gt 0 ]; then
|
76
|
76
|
__PROMPT__+="\e[1;34m$nbrj\e[0;34m job en cours\n"
|
77
|
77
|
fi
|
78
|
|
-# __PROMPT__+=$(git_prompt_string)
|
|
78
|
+ __PROMPT__+=$(git_prompt_string)
|
79
|
79
|
__PROMPT__+="\e[0;32m$([[ $UID == 0 ]] && echo '\e[47m\e[4;31m /!\ root /!\ \e[0m\e[0;31m ')"
|
80
|
80
|
__PROMPT__+="$(pwd)\e[0m"
|
81
|
81
|
echo -e "$__PROMPT__"
|