ascii-chat 0.11.33
Video chat in your terminal
Loading...
Searching...
No Matches
option_metadata_t Struct Reference

Metadata for shell completion generation. 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

Metadata for shell completion generation.

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 192 of file builder.h.

Field Documentation

◆ default_value

const char* option_metadata_t::default_value

Default value as string for display.

Definition at line 211 of file builder.h.

Referenced by options_builder_set_default_value_display().

◆ 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 197 of file builder.h.

Referenced by options_builder_set_enum_values(), 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 198 of file builder.h.

Referenced by format_option_default_value_str().

◆ 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 195 of file builder.h.

Referenced by format_option_default_value_str(), get_option_help_placeholder_str(), options_builder_set_enum_values(), 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 208 of file builder.h.

Referenced by options_builder_set_examples(), and 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 217 of file builder.h.

Referenced by options_builder_mark_as_list().

◆ max

◆ min

int option_metadata_t::min

◆ [struct]

◆ step

int option_metadata_t::step

Step size (0 = no step, continuous)

Definition at line 204 of file builder.h.

Referenced by options_builder_set_numeric_range(), and options_registry_get_numeric_range().

◆ validation_pattern

const char* option_metadata_t::validation_pattern

Optional regex pattern for validation hints.

Definition at line 220 of file builder.h.


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