ascii-chat 0.8.38
Real-time terminal-based video chat with ASCII art conversion
Loading...
Searching...
No Matches
bash.c File Reference

Bash shell completion script generator. More...

Go to the source code of this file.

Functions

asciichat_error_t completions_generate_bash (FILE *output)
 

Detailed Description

Bash shell completion script generator.

Generates bash completions dynamically from the options registry.

Definition in file bash.c.

Function Documentation

◆ completions_generate_bash()

asciichat_error_t completions_generate_bash ( FILE *  output)

Definition at line 367 of file bash.c.

367 {
368 if (!output) {
369 return SET_ERRNO(ERROR_INVALID_PARAM, "Output stream cannot be NULL");
370 }
371
372 bash_write_header(output);
373 asciichat_error_t err = bash_write_all_options(output);
374 if (err != ASCIICHAT_OK) {
375 return err;
376 }
377 bash_write_completion_logic(output);
378 bash_write_footer(output);
379
380 return ASCIICHAT_OK;
381}

Referenced by completions_generate_for_shell().