Merge pull request #10 from stffnb/feature/yellow_stash

Yellow stash symbol
This commit is contained in:
Denis Lehmann 2025-05-27 13:52:54 +02:00 committed by GitHub
commit c2dbe66d9d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 2 deletions

10
gis
View file

@ -230,7 +230,13 @@ for dir in "${git_dirs[@]}"; do
# Construct key output
if [[ "$status_keys" ]]; then
status_keys="${text_bold}${text_red}[${status_keys}]${text_reset}"
if [[ "$status_keys" == "\$" ]]; then
# Only stash symbol: yellow brackets and symbol
status_keys="${text_bold}${text_yellow}[${status_keys}]${text_reset}"
else
# Mixed status: only $ yellow, rest red
status_keys="${text_bold}${text_red}[${status_keys//\$/${text_yellow}\$${text_red}}]${text_reset}"
fi
else
status_keys="${text_bold}${text_green}[✓]${text_reset}"
fi
@ -261,7 +267,7 @@ done
# Print keys
if [[ "$all_status_keys" ]]; then
echo "${text_bold}Status${text_reset}"
[[ "$all_status_keys" == *"\$"* ]] && echo " ${text_bold}${text_red}\$${text_reset} - Dirty stash"
[[ "$all_status_keys" == *"\$"* ]] && echo " ${text_bold}${text_yellow}\$${text_reset} - Dirty stash"
[[ "$all_status_keys" == *"?"* ]] && echo " ${text_bold}${text_red}?${text_reset} - Untracked files"
[[ "$all_status_keys" == *"!"* ]] && echo " ${text_bold}${text_red}!${text_reset} - Local changes"
[[ "$all_status_keys" == *"+"* ]] && echo " ${text_bold}${text_red}+${text_reset} - Staged changes"

0
gis_completion.bash Normal file → Executable file
View file