createBashCompletionScript

Creates bash completion script.

Creates completion script for specified program, returning the script contents. You need to create it once, and save the script in directory like /etc/bash_completion.d/ during installation.

string
createBashCompletionScript

Return Value

Type: string

Generated completion script contents.

Examples

import std.file : write;
import std.string : format;
import commandr;

auto prog = new Program("test");
std.file.write("%s.bash".format(prog.binaryName), createBashCompletionScript(prog));

Meta