libfossil
fcli_command Struct Reference

Describes a named callback command. More...

#include "cli.h"

Collaboration diagram for fcli_command:

Data Fields

char const * aliases
 NUL-delimited string containing optional aliases of the above command name.
char const * briefDescription
 Brief description, for use in generating help text.
fcli_command_f f
 The callback for this command.
fcli_cliflag const * flags
 Must be NULL or an array compatible with fcli_process_flags().
char const * name
 The name of the command.
void(* usage )(void)
 Optional usage callback for this command.

Detailed Description

Describes a named callback command.

See also
fcli_dispatch_commands()

Definition at line 832 of file cli.h.

Field Documentation

◆ aliases

char const* fcli_command::aliases

NUL-delimited string containing optional aliases of the above command name.

This string must be double-NUL terminated (e.g., "alias\0\al\0").

Definition at line 839 of file cli.h.

◆ briefDescription

char const* fcli_command::briefDescription

Brief description, for use in generating help text.

Definition at line 841 of file cli.h.

◆ f

fcli_command_f fcli_command::f

The callback for this command.

Definition at line 843 of file cli.h.

◆ flags

fcli_cliflag const* fcli_command::flags

Must be NULL or an array compatible with fcli_process_flags().

Can be used from within this->f for command-specific flag dispatching, as well as help text generation.

Definition at line 851 of file cli.h.

◆ name

char const* fcli_command::name

The name of the command.

Definition at line 834 of file cli.h.

◆ usage

void(* fcli_command::usage) (void)

Optional usage callback for this command.

Definition at line 845 of file cli.h.


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