Skip to content

vncsmyrnk/compgen

Repository files navigation

CI Workflow contributions

compgen

Goal: a runtime dependency-free completions generator for multiple shells configurable via document language.

Inspiration: jdx/usage. usage is a great tool and it is a runtime dependency.

Secondary goals

  • Define generic parseable completion schema, based on existing usage's KDL spec
  • Create a documentation and manpage generator

Specification

This project's intent is to also define a specification for the completion generation. Inspiring on usage's KDL spec, a detailed specification and scoped specifically to completion generation (ignoring help and other runtime features) is at docs/spec.md.

Roadmap

  • KDL specification for commands, flags and arguments
  • KDL parsing and AST implementation
  • Completion generation for a particular shell, generic enough to expect future implementations for other shells
  • Document usage for users
  • Document requirements and guidelines and for more shells

v0.1.0 Milestone

Install

From source

make install # run `make uninstall` to uninstall it
cg --shell=zsh ./completions.kdl # Generate completions for `compgen` itself as a demo

Completions

Completions for compgen are generated by compgen itself at build-time, the official spec is at completions.kdl. It should by available after a successfull installation.

Running tests

make check

About

Shell completions generator.

Topics

Resources

License

Stars

Watchers

Forks

Contributors