girara
Functions
commands.h File Reference
#include "macros.h"
#include "types.h"

Go to the source code of this file.

Functions

bool girara_inputbar_command_add (girara_session_t *session, const char *command, const char *abbreviation, girara_command_function_t function, girara_completion_function_t completion, const char *description) GIRARA_VISIBLE
 
bool girara_special_command_add (girara_session_t *session, char identifier, girara_inputbar_special_function_t function, bool always, int argument_n, void *argument_data) GIRARA_VISIBLE
 
bool girara_command_run (girara_session_t *session, const char *input) GIRARA_VISIBLE
 

Function Documentation

◆ girara_command_run()

bool girara_command_run ( girara_session_t *  session,
const char *  input 
)

Parse input and execute the command

Parameters
sessionThe used girara session
inputUser input
Returns
TRUE No error occurred
FALSE An error occured

◆ girara_inputbar_command_add()

bool girara_inputbar_command_add ( girara_session_t *  session,
const char *  command,
const char *  abbreviation,
girara_command_function_t  function,
girara_completion_function_t  completion,
const char *  description 
)

Adds an inputbar command

Parameters
sessionThe used girara session
commandThe name of the command
abbreviationThe abbreviation of the command
functionExecuted function
completionCompletion function
descriptionDescription of the command
Returns
TRUE No error occurred
FALSE An error occurred

◆ girara_special_command_add()

bool girara_special_command_add ( girara_session_t *  session,
char  identifier,
girara_inputbar_special_function_t  function,
bool  always,
int  argument_n,
void *  argument_data 
)

Adds a special command

Parameters
sessionThe used girara session
identifierChar identifier
functionExecuted function
alwaysIf the function should executed on every change of the input (e.g.: incremental search)
argument_nArgument identifier
argument_dataArgument data
Returns
TRUE No error occurred
FALSE An error occurred