adaszko/complgen: Generate {bash,fish,zsh} completions from a single EBNF-like grammar

This page summarizes the projects mentioned and recommended in the original post on /r/rust

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • complgen

    Generate bash/fish/zsh completions from a single declarative grammar familiar from man pages

  • The advantage complgen has over clap_complete (currently) is that it can generate completions based on an external command output. For example for cargo, you can have this (incomplete yet) grammar that not only completes +toolchains in cargo but also suggest test names in cargo test .

  • emuriscv

  • See here for an example.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • intellicomp

    YAML-based specifications for providing cross-shell command completions

  • Interesting - I started working on something very similar a few months back: https://github.com/dob9601/intellicomp/tree/master

  • docopt

    This project is no longer maintained. Please see https://github.com/jazzband/docopt-ng

  • As for the implementation differences, complgen uses a trivial DSL that’s everybody is already familiar with more or less because it’s a slightly more rigorous version of what tools usually spit out when you do command --help (projects like docopt even use that for command line arguments parsing). Those happen to be regular languages and therefore can be represented as a Deterministic Finite Automata. complgen compiles the grammars to DFAs, minimizes the DFA and spits out shell-specific shell completions scripts that simply walk the DFA to match and complete the current input.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts