Class Styles

java.lang.Object
org.jline.builtins.Styles

public class Styles extends Object
Provides styling utilities for JLine applications.

This class contains methods and constants for working with terminal styles and colors. It supports various style formats including:

  • LS_COLORS format for file listings
  • Help text styling
  • Print styling
  • Syntax highlighting

The class provides parsers for different style formats and resolvers to apply styles to text in the terminal.

  • Field Details

  • Constructor Details

    • Styles

      public Styles()
  • Method Details

    • lsStyle

      public static StyleResolver lsStyle()
      Gets a StyleResolver for file listings using LS_COLORS format.

      This method creates a StyleResolver that applies styles to file listings based on the LS_COLORS environment variable or default styles if not set.

      Returns:
      a StyleResolver for file listings
    • helpStyle

      public static StyleResolver helpStyle()
      Gets a StyleResolver for help text using HELP_COLORS format.

      This method creates a StyleResolver that applies styles to help text based on the HELP_COLORS environment variable or default styles if not set.

      Returns:
      a StyleResolver for help text
    • prntStyle

      public static StyleResolver prntStyle()
      Gets a StyleResolver for print output using PRNT_COLORS format.

      This method creates a StyleResolver that applies styles to print output based on the PRNT_COLORS environment variable or default styles if not set.

      Returns:
      a StyleResolver for print output
    • isStylePattern

      public static boolean isStylePattern(String style)
    • style

      public static StyleResolver style(String name, String defStyle)
    • style

      public static StyleResolver style(String style)