1
0
Fork 0
mirror of https://github.com/alacritty/alacritty.git synced 2024-11-03 04:34:21 -05:00
alacritty/alacritty-completions.zsh
Christian Duerr f298ebb217
Add shell completions and manpage
* Add manpage

Adds a basic manpage that was autogenerated with `help2man` and then
slightly adjusted with information from the README.md and better
formatting.

* Add zsh completions

Add completions for the zsh shell. These should be complete and even
allow completion of the command inside `--command` and `-e`.

* Add bash completions

The bash completions are almost on the same level as the zsh
completions. The only little thing the bash completions do not do is
complete inside of `--command` and `-e`, instead bash just stops
completion after these options.

* Update readme with manpage and completions

Added the install instructions for the manpage and completions to the
README.md.

Also tweaked the current readme a slight bit because the build section
was structured in a slightly confusing way.
2018-03-07 21:34:05 +00:00

23 lines
1.1 KiB
Bash

#compdef alacritty
_alacritty() {
local context curcontext="$curcontext" state line
typeset -A opt_args
_arguments \
"(-h --help)"{-h,--help}"[Prints help information]" \
"(-V --version)"{-V,--version}"[Prints version information]" \
"(--no-live-config-reload)--live-config-reload[Enable automatic config reloading]" \
"(--live-config-reload)--no-live-config-reload[Disable automatic config reloading]" \
"--print-events[Print all events to stdout]" \
{-q,-qq}"[Reduces the level of verbosity (min is -qq)]" \
{-v,-vv,-vvv}"[Increases the level of verbosity (max is -vvv)]" \
"--ref-test[Generates ref test]" \
"--config-file[Specify an alternative config file]:file:_files" \
"(-d --dimensions)"{-d,--dimensions}"[Window dimensions]:dimensions:_guard '<->' width: :_guard '<->' length" \
"--title[Defines the window title]:title:" \
"--working-directory[Start shell in specified directory]:directory:_dir_list" \
"(-e --command)"{-e,--command}"[Execute command (must be last arg)]:program: _command_names -e:*::program arguments: _normal"
}
_alacritty "$@"