Skip to content

Commit

Permalink
Merge pull request #37 from rkuhn/improve-sorted-listing-∂π
Browse files Browse the repository at this point in the history
make sorting by project name more visible in g8 -l
  • Loading branch information
softprops committed Mar 12, 2012
2 parents 517df54 + b363216 commit 0527fd1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/src/main/scala/discover.scala
Expand Up @@ -11,7 +11,10 @@ trait Discover { self: Giter8 =>
templates match {
case Nil => Right("No templates matching %s" format query.get)
case _ => Right(templates.sortBy { _.name } map { t =>
"%-40s%s" format(t.user + "/" + t.name, t.desc)
val padding =
if (t.name.length < 20 || t.desc == "") ""
else "\n "
"%20s/%-20s%s%s" format(t.user, t.name, padding, t.desc)
} mkString("\n"))
}
}
Expand Down

0 comments on commit 0527fd1

Please sign in to comment.