giti: adaption for kali_prompt
This commit is contained in:
parent
2ee1207ad3
commit
993cf955fb
18
giti
18
giti
@ -58,26 +58,29 @@ else
|
||||
git_url="$(git config --get remote.origin.url 2> /dev/null)"
|
||||
if [[ ! $git_status =~ "working tree clean" ]] && [[ ! $git_status =~ "working directory clean" ]]; then
|
||||
git_status_color="$COLOR_RED"
|
||||
git_status_text="╡ local changes ╞"
|
||||
git_status_text="local changes"
|
||||
elif [[ $git_status =~ "Your branch is behind" ]]; then
|
||||
git_status_color="$COLOR_YELLOW"
|
||||
git_status_text="╡ pull required ╞"
|
||||
git_status_text="pull required"
|
||||
elif [[ $git_status =~ "Your branch is ahead of" ]]; then
|
||||
git_status_color="$COLOR_YELLOW"
|
||||
git_status_text="╡ push required ╞"
|
||||
git_status_text="push required"
|
||||
elif [[ $git_status =~ "nothing to commit" ]]; then
|
||||
git_status_color="$COLOR_DARKGREEN"
|
||||
git_status_text="╡ clean ╞════════"
|
||||
git_status_text="clea "
|
||||
else
|
||||
git_status_color="$COLOR_OCHRE"
|
||||
git_status_text="╡ unknown ╞══════"
|
||||
git_status_text="unknown "
|
||||
fi
|
||||
fi
|
||||
|
||||
echo -e "$git_status_color╔═══$git_status_text════════════════════════════════════════════════════════════════"
|
||||
if [[ $NO_DETAILS ]]; then
|
||||
echo -e "$git_status_color╠══$COLOR_GREEN($git_branch)$git_status_color - $git_status_text - $COLOR_CYAN$git_url$COLOR_WHITE\n\b"
|
||||
else
|
||||
echo -e "$git_status_color╔═══╡ $git_status_text ╞════════════════════════════════════════════════════════════════"
|
||||
echo -e "$git_status_color║ $COLOR_GREEN($git_branch) $COLOR_CYAN$git_url"
|
||||
|
||||
if [[ ! $git_diff == "" && $NO_DETAILS != "True" ]]; then
|
||||
if [[ ! $git_diff == "" ]]; then
|
||||
echo -e "$git_status_color╠════════════════════════════════════════════════════════════════════════════════════"
|
||||
IFS=$'\n'
|
||||
for ENTRY in $git_diff; do
|
||||
@ -91,3 +94,4 @@ else
|
||||
echo -e "$git_status_color╚════════════════════════════════════════════════════════════════════════════════════$COLOR_WHITE\n \b"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user