Packages

  • package root

    A collection of Scala command-line interface tools.

    A collection of Scala command-line interface tools.

    Definition Classes
    root
  • package scalax
    Definition Classes
    root
  • package cli
    Definition Classes
    scalax
  • Table

package cli

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. All

Value Members

  1. object Table

    Print a pretty command line table.

    Print a pretty command line table.

    import scalax.cli.Table
    import shapeless.Sized
    
    val table = Table(Sized("h1", "h2", "h3"))
    
    table.rows += Sized("a", "b", "c")
    table.rows += Sized("d", "e", "f")
    
    table.alignments(1) = Table.Alignment.Right
    
    val lines: List[String] = table.lines

    Print it:

    table.print()
    table.print(Console.err)
    
    // h1 | h2 | h3
    // ---|----|---
    // a  |  b | c
    // d  |  e | f

Ungrouped