✓ Uses Rust 2018 edition
|new 0.2.0||Jul 2, 2020|
|0.1.4||Jun 30, 2020|
#488 in Command line utilities
autocshell is a command line tool that enables you to generate shell files/scripts that you can use in order to provide auto completion capabilities for your command line programs.
This program is able to generate scripts for various shells (currently only bash and zsh) and not for c-shell only (not to be confused due to the name being auto-cshell).
The only thing that autocshell requires is a simple to create configuration file that will take as input. In order to check the configuration file format please run autocshell with the --config-help flag.
By default autocshell prints the script in the standard output so you can redirect the output to whatever file you like but by providing the --output option the program can do that for you :)
The configuration file that you must provide as input (using -c or --config option) has the following format:
shell: <shell_type> (bash|zsh) program_name: <program_name> use_equals_sign: (true|false) [default: true] (available only for zsh) option*: short?: <short_name> _ |-> At least one should exist long?: <long_name> ‾ takes_value?: (true|false) [default: true] (available only for zsh) accepts_files?: (true|false) [default: false] accepts_multiple?: (true|false) [default: false] (available only for zsh) description?: (available only for zsh) fixed_values?: [<fixed_value>, ...] (available only for zsh)
Value: It's the shell you want to generate the script for.
Value: The name of you program to generate the autocompletions for
Value: Denotes whether we want to add an equals sign (=) after option completion. This is valid only for zsh.
Value: None. The option field gets no value. It starts a new option definition
Value: The short option description (- must be included)
Value: The long option description (-- must be included)
Value: Denotes whether this option takes an option or not (it's a flag). This is valid only for zsh.
Value: Denotes whether that option takes files/directories as value(s). Must be true or false
Value: This value denotes whether the option can appear multiple times in the cli . This is valid only for zsh.
Value: This value contains the description that will appear when auto completing this option. This is valid only for zsh.
Value: This value is a bracketed comma separated list of fixed values that will be auto completed for that option. This is valid only for zsh.
* short and long fields are not mandatory, however if you define an option at least one of them must be present.