Overview
Run it¶
Help
$ cmdcomp --help
Usage: cmdcomp [-h] [--version] [--verbose | --no-verbose] --file FILE
--shell-type {bash,zsh} [--output-file OUTPUT_FILE]
shell completion file generator.
Options:
-h, --help show this help message and exit
--version show program's version number and exit
--verbose, --no-verbose
output verbose log.
--file, --config, -f FILE
config file path. supported formats are ".json",
".yaml", ".toml" and ".jinja".
--shell-type {bash,zsh}
target shell type.
--output-file, -o OUTPUT_FILE
output file path. default is stdout.
Config¶
cmdcomp automatically generates a completion file according to the contents of the configuration file.
The overall structure of the configuration file is shown below.
More detailed information is given in the next section.
Please refer to JSON Schema for exact schema information.
Tip
jinja is also supported.
This is useful when you want to group duplicate settings into a variable.
Tip
You can use json
yaml
toml
for the format of the config file, but I recommend yaml
for configuration.
The yaml language server gives the best development experience as an extension available for VSCode.
I have added the following configuration to VSCode, which makes it easier to write configuration files.