correct CommandUtil.aligned to use provided prefix

This commit is contained in:
Mark Harrah 2012-07-13 13:41:00 -04:00
parent 2cf9b4bf6e
commit 2a6ad35502
1 changed files with 1 additions and 1 deletions

View File

@ -24,7 +24,7 @@ object CommandUtil
def aligned(pre: String, sep: String, in: Seq[(String, String)]): Seq[String] =
{
val width = in.map(_._1.length).max
in.map { case (a, b) => (" " + fill(a, width) + sep + b) }
in.map { case (a, b) => (pre + fill(a, width) + sep + b) }
}
def fill(s: String, size: Int) = s + " " * math.max(size - s.length, 0)