diff options
author | Peter Wu <lekensteyn@gmail.com> | 2013-11-22 19:57:55 +0100 |
---|---|---|
committer | Peter Wu <lekensteyn@gmail.com> | 2013-11-22 19:57:55 +0100 |
commit | 0aead04cb732d55c584c1235dd59d15a02d54461 (patch) | |
tree | 5a183c4f280b54d1acd567f01003e7499b25afd5 /git-log-describe.awk | |
parent | ca85432c68099397aeb60b0f9fd1ca9186c4c8b5 (diff) | |
download | scripts-0aead04cb732d55c584c1235dd59d15a02d54461.tar.gz |
git-log-describe: stop color on line
To avoid funny color effects when doing:
git log --color | git-log-describe.awk | less -RN
Diffstat (limited to 'git-log-describe.awk')
-rwxr-xr-x | git-log-describe.awk | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/git-log-describe.awk b/git-log-describe.awk index 9bb5896..579b06d 100755 --- a/git-log-describe.awk +++ b/git-log-describe.awk @@ -31,6 +31,7 @@ $1 == "commit" && $2 ~ /^[0-9a-f]{5,40}$/ { printf("%" indent_len "sDescribe: ", ""); if (is_color) printf("\033[96m"); # light cyan - system("git describe --first-parent " hash);# " |tr -d '\''\n'\''"); + system("git describe --first-parent " hash " | tr -d '\n'"); if (is_color) printf("\033[m"); + printf("\n"); } |