Say

SolidGroundUX DocumentationSolidGroundUX
NL

fn: say

Purpose

Emit a standardized SolidGroundUX console message.

Behavior

  • Renders a message using the framework message style maps.
  • Supports typed messages such as INFO, STRT, WARN, FAIL, CNCL, OK, END, DEBUG, and EMPTY.
  • Accepts the message type either as a positional first argument or through the --type option.
  • Applies optional date, label, icon, and symbol prefixes according to the active style configuration.
  • Applies optional colorization to the label, message, date, or all visible message parts.
  • Respects SGND_CONSOLE_LOG_LEVEL for console visibility.
  • Applies SGND_FILE_LOG_LEVEL independently and writes matching messages, even when console output is suppressed by the current log level.
  • Ensures pending progress output is followed by a clean line break before printing a normal message.

Arguments

  • $1... — Message words; an optional first word specifies the type. When the first word is a recognized type, the remaining words form the message. Otherwise all words form an EMPTY (unprefixed) message.

Options

  • --type TYPE — Explicitly set the message type.
  • --date — Prefix the message with the current date/time using SAY_DATE_FORMAT.
  • --show VALUE — Select which prefix elements are shown. Supported values are label, icon, symbol, all, or combinations using comma or plus separators.
  • --colorize VALUE — Select which parts are colorized. Supported values are none, label, msg, date, both, and all.
  • --delay VALUE — Delay after handling the message. The default is 0 (no delay). Positive values are passed to sleep and may be fractional. With --delay -1, wait for a single keypress instead of sleeping.

Inputs (globals)

  • SAY_DATE_DEFAULT, SAY_SHOW_DEFAULT, SAY_COLORIZE_DEFAULT, SAY_DATE_FORMAT
  • SGND_CONSOLE_LOG_LEVEL, SGND_FILE_LOG_LEVEL, SGND_LINEBREAK_PENDING
  • LBL_, ICO_, SYM_, MSG_CLR_, RESET

Output

  • Prints the rendered message to stdout when allowed by SGND_CONSOLE_LOG_LEVEL.
  • Appends a timestamped best-effort logfile record when allowed by SGND_FILE_LOG_LEVEL.

Returns

  • 0 always. Unknown message types are normalized to EMPTY.

Usage

  say INFO "Starting workspace deployment"
  say --type WARN --date "Configuration file not found"
  say --show label,icon --colorize all OK "Deployment completed"
  say "Plain output without a message prefix"