shell completion file generator.
Project description
Command Completion Generator Tool
cmdcomp
generate shell completion file (bash
or zsh
) from config json
/yaml
/toml
file.
Install
pip install cmdcomp
Usage
Local
cmdcomp --file ${YOUR_CONFIG_FILE} --shell-type bash
Docker
docker run --rm -itv $(pwd):/app/cmdcomp yassun7010/cmdcomp --file ${YOUR_CONFIG_FILE} --shell-type bash
Config
Configuration can be written in JSON
, YAML
, and TOML
file formats.
Sample
cmdcomp:
version: "2"
app:
name: "mycli"
alias: "my-cli"
root:
arguments:
--verbose:
type: flag
description: "verbose output."
--no-verbose:
type: flag
description: "no verbose output."
--version:
type: flag
alias: "-V"
description: "print version."
--config:
type: file
description: "config file."
--type:
type: select
description: "config file type."
values:
- json
- toml
--help:
type: flag
description: "print help."
subcommands:
list:
alias: "ls"
description: "list project files."
arguments:
--all:
type: flag
alias: "-a"
description: "list all files."
"*":
type: file
description: "list files."
cd:
description: "cd project directory."
arguments:
-P:
type: flag
description: "physical directory."
1:
type: file
base_path: $HOME
description: "change home directory."
test:
description: "test command."
subcommands:
rubocop:
description: "run rubocop."
arguments:
--auto-correct:
type: flag
alias: "-A"
description: "auto correct."
pytest:
description: "run pytest."
JSON Schema
https://raw.githubusercontent.com/yassun7010/cmdcomp/main/docs/config.schema.json
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cmdcomp-2.3.2.tar.gz
(11.6 kB
view hashes)
Built Distribution
cmdcomp-2.3.2-py3-none-any.whl
(19.9 kB
view hashes)