glint/style

Types

Colour configuration type for help text headings. the List(String) values can be RGB colour values or ANSI colour codes

pub type PrettyHelp {
  PrettyHelp(
    usage: List(String),
    flags: List(String),
    subcommands: List(String),
  )
}

Constructors

  • PrettyHelp(
      usage: List(String),
      flags: List(String),
      subcommands: List(String),
    )

Constants

pub const flags_key: String = "flags"

Key for looking up the style of the flags heading

pub const subcommands_key: String = "subcommands"

Key for looking up the style of the subcommands heading

pub const usage_key: String = "usage"

Key for looking up the style of the usage heading

Functions

pub fn heading(lookups: List(
    #(List(String), List(#(String, List(String)))),
  ), heading: String, colour: String) -> String

Style heading text with the provided lookups this is only intended for use within glint itself.

pub fn lookups(pretty: PrettyHelp) -> List(
  #(List(String), List(#(String, List(String)))),
)

Create shellout lookups from the provided pretty help this is only intended for use within glint itself.

Search Document