single lines for giti

This commit is contained in:
Dirk Alders 2023-09-03 09:56:03 +02:00
parent 6326de2e69
commit c37533ea58

22
giti
View File

@ -73,25 +73,31 @@ else
git_status_text="unknown " git_status_text="unknown "
fi fi
fi fi
if [[ $NO_DETAILS ]]; then 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" # echo -e "$git_status_color╠══$COLOR_GREEN($git_branch)$git_status_color - $git_status_text - $COLOR_CYAN$git_url$COLOR_WHITE\n\b"
echo -e "$git_status_color├──$COLOR_GREEN($git_branch)$git_status_color - $git_status_text - $COLOR_CYAN$git_url$COLOR_WHITE\n\b"
else else
echo -e "$git_status_color╔═══╡ $git_status_text ╞════════════════════════════════════════════════════════════════" # echo -e "$git_status_color╔═══╡ $git_status_text ╞════════════════════════════════════════════════════════════════"
echo -e "$git_status_color║ $COLOR_GREEN($git_branch) $COLOR_CYAN$git_url" echo -e "$git_status_color┌───┤ $git_status_text ├────────────────────────────────────────────────────────────────"
# echo -e "$git_status_color║ $COLOR_GREEN($git_branch) $COLOR_CYAN$git_url"
echo -e "$git_status_color│ $COLOR_GREEN($git_branch) $COLOR_CYAN$git_url"
if [[ ! $git_diff == "" ]]; then if [[ ! $git_diff == "" ]]; then
echo -e "$git_status_color╠════════════════════════════════════════════════════════════════════════════════════" # echo -e "$git_status_color╠════════════════════════════════════════════════════════════════════════════════════"
echo -e "$git_status_color├────────────────────────────────────────────────────────────────────────────────────"
IFS=$'\n' IFS=$'\n'
for ENTRY in $git_diff; do for ENTRY in $git_diff; do
if [[ $ENTRY = "D "* ]] || [[ $ENTRY = "A "* ]] || [[ $ENTRY = "M "* ]] || [[ $ENTRY = "R "* ]]; then if [[ $ENTRY = "D "* ]] || [[ $ENTRY = "A "* ]] || [[ $ENTRY = "M "* ]] || [[ $ENTRY = "R "* ]]; then
echo -e "$git_status_color║ $COLOR_DARKYELLOW$ENTRY" # echo -e "$git_status_color║ $COLOR_DARKYELLOW$ENTRY"
echo -e "$git_status_color│ $COLOR_DARKYELLOW$ENTRY"
else else
echo -e "$git_status_color║ $COLOR_YELLOW$ENTRY" # echo -e "$git_status_color║ $COLOR_YELLOW$ENTRY"
echo -e "$git_status_color│ $COLOR_YELLOW$ENTRY"
fi fi
done done
fi fi
echo -e "$git_status_color╚════════════════════════════════════════════════════════════════════════════════════$COLOR_WHITE\n \b" # echo -e "$git_status_color╚════════════════════════════════════════════════════════════════════════════════════$COLOR_WHITE\n \b"
echo -e "$git_status_color└────────────────────────────────────────────────────────────────────────────────────$COLOR_WHITE\n \b"
fi fi
fi fi
fi fi