Creating a bash completion script (2018)

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

CodeRabbit: AI Code Reviews for Developers
Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.
coderabbit.ai
featured
Nutrient – The #1 PDF SDK Library, trusted by 10K+ developers
Other PDF SDKs promise a lot - then break. Laggy scrolling, poor mobile UX, tons of bugs, and lack of support cost you endless frustrations. Nutrient’s SDK handles billion-page workloads - so you don’t have to debug PDFs. Used by ~1 billion end users in more than 150 different countries.
www.nutrient.io
featured
  1. Git

    Git Source Code Mirror - This is a publish-only repository but pull requests can be turned into patches to the mailing list via GitGitGadget (https://gitgitgadget.github.io/). Please follow Documentation/SubmittingPatches procedure for any of your improvements.

    Writing shell completions is a surprisingly tricky - especially for larger CLI tools or when you want to provide more advanced suggestions. Everything has to be done imperatively, usually as a shell script! It can get hairy quickly.

    As a point of comparison, see the difference between the git completions written in bash [1] vs the declarative equivalent [2].

    [1] https://github.com/git/git/blob/master/contrib/completion/gi...

    [2] https://github.com/withfig/autocomplete/blob/master/src/git....

  2. CodeRabbit

    CodeRabbit: AI Code Reviews for Developers. Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.

    CodeRabbit logo
  3. autocomplete

    IDE-style autocomplete for your existing terminal & shell

    Writing shell completions is a surprisingly tricky - especially for larger CLI tools or when you want to provide more advanced suggestions. Everything has to be done imperatively, usually as a shell script! It can get hairy quickly.

    As a point of comparison, see the difference between the git completions written in bash [1] vs the declarative equivalent [2].

    [1] https://github.com/git/git/blob/master/contrib/completion/gi...

    [2] https://github.com/withfig/autocomplete/blob/master/src/git....

  4. zio-cli

    Rapidly build powerful command-line applications powered by ZIO

    >It would almost be easier to modify the bash source itself to read and use a regular grammar

    It's an interesting idea that we're using for zio-cli [1].

    [1] https://github.com/zio/zio-cli/pull/119

  5. zsh-completions

    Additional completion definitions for Zsh.

  6. fzf

    :cherry_blossom: A command-line fuzzy finder

  7. cleo

    Cleo allows you to create beautiful and testable command-line interfaces.

    I use Cleo for python, same thing, has the ability to generate completion scripts. I also find the API far saner than argparse or click. I don't really use the docstring-parser, I prefer using the Command api for finer control, but it's really cool to just write the help docs and automagically get options.

    https://github.com/sdispater/cleo

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

Did you know that Go is
the 4th most popular programming language
based on number of references?