Commit b673c445 authored by Vincent Driessen's avatar Vincent Driessen

Better (less complex) way of counting the branch name length.

parent 68845235
......@@ -44,7 +44,7 @@ cmd_list() {
typeset -i width=0
typeset branch
for branch in $short_names; do
typeset -i len=$(($(echo "$branch" | wc -c) - 1))
typeset -i len=${#branch}
width=$(max $width $len)
done
width=width+3
......
......@@ -56,7 +56,7 @@ cmd_list() {
typeset -i width=0
typeset branch
for branch in $short_names; do
typeset -i len=$(($(echo "$branch" | wc -c) - 1))
typeset -i len=${#branch}
width=$(max $width $len)
done
width=width+3
......
......@@ -46,7 +46,7 @@ cmd_list() {
typeset -i width=0
typeset branch
for branch in $short_names; do
typeset -i len=$(($(echo "$branch" | wc -c) - 1))
typeset -i len=${#branch}
width=$(max $width $len)
done
width=width+3
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment