Skip to main content

Module settings

Module settings 

Source
Expand description

Global prompt settings — ports @clack/core’s settings.ts.

Right now this is a thin holder for the messages that the prompts use when the user cancels or an error stops a spinner. The defaults match clack. Override via update before running any prompts:

cli_ui::prompt::settings::update(|s| s.cancel = "Aborted.".into());

Structs§

Colors
Every color slot the prompt theme reads. Override via update_colors.
Settings
Global prompt settings — colour palette, default messages, key behaviours. Read with get, mutate with update or update_colors, replace the colours wholesale with set_colors.

Functions§

colors
Convenience: pull just the Colors from the current settings.
get
Get a snapshot of the current settings.
set_colors
Replace the colour palette wholesale — handy for shipping named themes.
update
Mutate the global settings in place.
update_colors
Mutate just the Colors block without touching other settings.