2
0
mirror of https://github.com/kazhala/dotbare synced 2024-11-17 21:25:32 +00:00

improve modified search coloring

This commit is contained in:
kevin zhuang 2020-04-17 15:04:03 +10:00
parent 0ea174a305
commit ddd0e8320d

View File

@ -86,8 +86,10 @@ function get_modified_file() {
/usr/bin/git --git-dir="${DOTBARE_DIR}" --work-tree="${DOTBARE_TREE}" \ /usr/bin/git --git-dir="${DOTBARE_DIR}" --work-tree="${DOTBARE_TREE}" \
status --porcelain\ status --porcelain\
| awk '{ | awk '{
if ($0 ~ /^[A-Za-z].*$/) { if ($0 ~ /^[A-Za-z][A-Za-z].*$/) {
print "\033[32m" substr($0, 1, 1) "\033[31m" substr($0, 2) print "\033[32m" substr($0, 1, 1) "\033[31m" substr($0, 2) "\033[0m"
} else if ($0 ~ /^[A-Za-z][ \t].*$/) {
print "\033[32m" $0 "\033[0m"
} else { } else {
print "\033[31m" $0 "\033[0m" print "\033[31m" $0 "\033[0m"
} }