Cod: New Command Line Autocomplete Daemon For Bash and Zsh That Detects --help Usage

Cod command line completion daemon

Cod is a new command line completion daemon written in Go for Bash and Zsh. The tool detects the usage of --help to generate autocompletion for commands that don't support it.

Command-line completion (tab completion / autocompletion) is a common feature among command-line interpreters, in which the program automatically fills in partially typed commands when pressing the completion key, which is usually Tab. By using it, fewer keystrokes are required to access common commands, and it makes it easy to autocomplete commands / filenames with long or difficult to spell names.

The elements that can be completed are not only commands and filenames, but also command arguments, and this is what Cod does. It parses the output of --help for a particular command, and based on that it generates autocompletion for Bash or Zsh shells. Some commands already support autocomplete for arguments (for example ls - type ls --fu and press Tab to autocomplete it to ls --full-time), but some don't and Cod can help in those cases.

0 Comments