mirror of
https://github.com/tj/git-extras.git
synced 2026-09-10 07:26:17 -04:00
git-summary: unescape tab for linux column utility
git-summary: unescape tab for linux column utility Linux column utility will escape tab if a separator is specified. This problem is first reported in Fedora 27.
This commit is contained in:
parent
16591d3788
commit
d4bf79df8f
|
|
@ -47,6 +47,9 @@ file_count() {
|
|||
#
|
||||
|
||||
authors() {
|
||||
# a rare unicode character is used as separator to avoid conflicting with
|
||||
# author name. However, Linux column utility will escape tab if separator
|
||||
# specified, so we do unesaping after it.
|
||||
git shortlog -n -s $commit | LC_ALL=C awk '
|
||||
{ args[NR] = $0; sum += $0 }
|
||||
END {
|
||||
|
|
@ -54,7 +57,7 @@ authors() {
|
|||
printf "%s♪%2.1f%%\n", args[i], 100 * args[i] / sum
|
||||
}
|
||||
}
|
||||
' | column -t -s♪
|
||||
' | column -t -s♪ | sed "s/\\\x09/\t/g"
|
||||
}
|
||||
|
||||
#
|
||||
|
|
|
|||
Loading…
Reference in a new issue