package spin

  1. Overview
  2. Docs

Module Inquire.StyleSource

Module to customize Inquire prompts.

Sourcetype color =
  1. | Black
  2. | Red
  3. | Green
  4. | Yellow
  5. | Blue
  6. | Magenta
  7. | Cyan
  8. | White
  9. | Bright_black
  10. | Bright_red
  11. | Bright_green
  12. | Bright_yellow
  13. | Bright_blue
  14. | Bright_magenta
  15. | Bright_cyan
  16. | Bright_white
  17. | Default

Available colors.

Sourcetype style =
  1. | Reset
  2. | Bold
  3. | Underlined
  4. | Inverse
  5. | Hidden
  6. | Foreground of color
  7. | Background of color

Various styles for the text. Blink and Hidden may not work on every terminal.

Sourceval black : style

Shortcut for Foreground Black

Sourceval red : style

Shortcut for Foreground Red

Sourceval green : style

Shortcut for Foreground Green

Sourceval yellow : style

Shortcut for Foreground Yellow

Sourceval blue : style

Shortcut for Foreground Blue

Sourceval magenta : style

Shortcut for Foreground Magenta

Sourceval cyan : style

Shortcut for Foreground Cyan

Sourceval white : style

Shortcut for Foreground White

Sourceval bg_black : style

Shortcut for Background Black

Sourceval bg_red : style

Shortcut for Background Red

Sourceval bg_green : style

Shortcut for Background Green

Sourceval bg_yellow : style

Shortcut for Background Yellow

Sourceval bg_blue : style

Shortcut for Background Blue

Sourceval bg_magenta : style

Shortcut for Background Magenta

Sourceval bg_cyan : style

Shortcut for Background Cyan

Sourceval bg_white : style

Shortcut for Background White

Sourceval bg_default : style

Shortcut for Background Default

Sourceval bold : style

Shortcut for Bold

Sourceval underlined : style

Shortcut for Underlined

Shortcut for Blink

Sourceval inverse : style

Shortcut for Inverse

Sourceval hidden : style

Shortcut for Hidden

Sourcetype t
Sourceval default : t

The default style used by Inquire prompts if none is provided.

Sourceval make : ?qmark_icon:string -> ?qmark_format:Ansi.style list -> ?message_format:Ansi.style list -> ?error_icon:string -> ?error_format:Ansi.style list -> ?default_format:Ansi.style list -> ?option_icon_marked:string -> ?option_icon_unmarked:string -> ?pointer_icon:string -> unit -> t

Create a custom style.

  • qmark_icon is the icon used for the question mark that prefixes the prompt.
  • qmark_format is the format of the question mark.
  • message_format is the format of the prompt message.
  • error_icon is the icon used for error messages.
  • error_format is the format used for the error messages.
  • default_format is the format used for the default tooltip of the prompt, if present.
  • option_icon_marked is the icon used to mark selected options in multi-selection prompts.
  • option_icon_unmarked is the icon used to mark unselected options in multi-selection prompts.
  • pointer_icon is the icon used to mark the selected option in single-selection prompts.
OCaml

Innovation. Community. Security.