From 1f7ead61346befe1956c97c20e36967436db6f64 Mon Sep 17 00:00:00 2001 From: ConstantConstantin Date: Thu, 8 Aug 2024 15:48:06 +0200 Subject: [PATCH] add symbol for renamed files --- README.org | 3 ++- gis | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/README.org b/README.org index db2a0ec..9005681 100644 --- a/README.org +++ b/README.org @@ -66,6 +66,7 @@ It was inspired by [[https://wiki.ros.org/wstool][wstool]], [[https://github.com ! - Local changes + - Staged changes - - File removed + » - File renamed = - Both modified ⇕ - Diverged from upstream ⇡ - Ahead upstream @@ -84,6 +85,6 @@ It was inspired by [[https://wiki.ros.org/wstool][wstool]], [[https://github.com : git remote set-head origin -a Or set it manually to any branch with: - : git remote set-head origin + : git remote set-head origin The number of additional local branches which are neither checked out, nor the =origin/HEAD= branch, is appended at the end of the branch output, e.g. =(+8)=. diff --git a/gis b/gis index 7aada75..e4d9bd6 100755 --- a/gis +++ b/gis @@ -219,6 +219,7 @@ for dir in "${git_dirs[@]}"; do status_keys="${status_keys//D/-}" status_keys="${status_keys//M/!}" status_keys="${status_keys//U/=}" + status_keys="${status_keys//R/»}" # Update all status keys all_status_keys="${all_status_keys}${status_keys}" @@ -261,6 +262,7 @@ if [[ "$all_status_keys" ]]; then [[ "$all_status_keys" == *"!"* ]] && echo " ${text_bold}${text_red}!${text_reset} - Local changes" [[ "$all_status_keys" == *"+"* ]] && echo " ${text_bold}${text_red}+${text_reset} - Staged changes" [[ "$all_status_keys" == *"-"* ]] && echo " ${text_bold}${text_red}-${text_reset} - File removed" + [[ "$all_status_keys" == *"»"* ]] && echo " ${text_bold}${text_red}»${text_reset} - File renamed" [[ "$all_status_keys" == *"="* ]] && echo " ${text_bold}${text_red}=${text_reset} - Both modified" [[ "$all_status_keys" == *"⇕"* ]] && echo " ${text_bold}${text_red}⇕${text_reset} - Diverged from upstream" [[ "$all_status_keys" == *"⇡"* ]] && echo " ${text_bold}${text_red}⇡${text_reset} - Ahead upstream"