ascii-chat
Binary v0.15.83-53-gb711d8720
Library lib/v0.3.2-701-gb711d8720
Video chat in your terminal
Loading...
Searching...
No Matches
option_metadata_t Struct Reference

Completion metadata attached to one option descriptor. More...

#include <include/ascii-chat/options/builder.h>

Data Fields

const char ** enum_values
 Enum value strings (null-terminated, e.g., {"auto", "none", "16", "256", "truecolor", NULL}).
const char ** enum_descriptions
 Descriptions parallel to enum_values (null-terminated, e.g., "Auto-detect from terminal").
const int * enum_integer_values
 Actual enum integer values (e.g., {-1, 0, 1, 2, 3} for non-sequential enums).
struct { 
   int   min 
 Minimum value (or 0 if no limit). More...
   int   max 
 Maximum value (or 0 if no limit). More...
   int   step 
 Step size (0 = no step, continuous). More...
} numeric_range
const char ** examples
 Example values or command invocations (null-terminated array).
const char * default_value
 Default value as string for display.
option_input_type_t input_type
 What kind of input this option expects.
bool is_list
 If true, option accepts multiple comma-separated or space-separated values.
const char * validation_pattern
 Optional regex pattern for validation hints.

Detailed Description

Completion metadata attached to one option descriptor.

Stores additional information about options to enable smart shell completions with value suggestions, numeric ranges, examples, etc. This data is used by all shell completion generators (bash, fish, zsh, powershell).

Definition at line 197 of file builder.h.

Field Documentation

◆ default_value

const char* option_metadata_t::default_value

Default value as string for display.

Definition at line 216 of file builder.h.

◆ enum_descriptions

const char* * option_metadata_t::enum_descriptions

Descriptions parallel to enum_values (null-terminated, e.g., "Auto-detect from terminal").

Definition at line 202 of file builder.h.

Referenced by options_get_enum_entries(), options_registry_add_all_to_builder(), and options_registry_get_enum_values().

◆ enum_integer_values

const int* option_metadata_t::enum_integer_values

Actual enum integer values (e.g., {-1, 0, 1, 2, 3} for non-sequential enums).

Definition at line 203 of file builder.h.

Referenced by options_get_enum_entries().

◆ enum_values

const char* * option_metadata_t::enum_values

Enum value strings (null-terminated, e.g., {"auto", "none", "16", "256", "truecolor", NULL}).

Definition at line 200 of file builder.h.

Referenced by options_get_enum_entries(), options_json_schema_for_option(), options_registry_add_all_to_builder(), and options_registry_get_enum_values().

◆ examples

const char** option_metadata_t::examples

Example values or command invocations (null-terminated array).

Definition at line 213 of file builder.h.

Referenced by options_registry_get_examples().

◆ input_type

option_input_type_t option_metadata_t::input_type

◆ is_list

bool option_metadata_t::is_list

If true, option accepts multiple comma-separated or space-separated values.

Definition at line 222 of file builder.h.

◆ max

int option_metadata_t::max

Maximum value (or 0 if no limit).

Definition at line 208 of file builder.h.

Referenced by config_schema_build_from_configs(), options_registry_add_all_to_builder(), and options_registry_get_numeric_range().

◆ min

int option_metadata_t::min

Minimum value (or 0 if no limit).

Definition at line 207 of file builder.h.

Referenced by config_schema_build_from_configs(), and options_registry_get_numeric_range().

◆ [struct]

struct { ... } option_metadata_t::numeric_range

◆ step

int option_metadata_t::step

Step size (0 = no step, continuous).

Definition at line 209 of file builder.h.

Referenced by options_registry_get_numeric_range().

◆ validation_pattern

const char* option_metadata_t::validation_pattern

Optional regex pattern for validation hints.

Definition at line 225 of file builder.h.


The documentation for this struct was generated from the following file: