Skip to content

generateBashCompletion ​

Generated reference page for the generateBashCompletion function export.

Signatures ​

ts
function generateBashCompletion(schema: CLISchema, options?: CompletionOptions): string;
ParameterTypeDescription
schemaCLISchemaThe CLI schema.
optionsCompletionOptions | undefinedOptional generator configuration.

Members ​

Members ​

generateBashCompletion ​

Generate a bash completion script for the CLI.

Use this when you want a bash-specific script directly rather than routing through generateCompletion. The generated script expects the bash-completion package because it relies on _init_completion.

ts
(schema: CLISchema, options?: CompletionOptions): string;

Examples ​

ts
const script = generateBashCompletion(app.schema);
// install with: mycli completions bash > /etc/bash_completion.d/mycli

See Also ​

Released under the MIT License.