#compdef rainbow
# --------------------------------------------------------------------------------------------------
# Licensing
#   This program is free software: you can redistribute it and/or modify
#   it under the terms of the GNU General Public License as published by
#   the Free Software Foundation, either version 3 of the License, or
#   (at your option) any later version.
#
#   This program is distributed in the hope that it will be useful,
#   but WITHOUT ANY WARRANTY; without even the implied warranty of
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#   GNU General Public License for more details.
#
#   You should have received a copy of the GNU General Public License
#   along with this program.  If not, see <http://www.gnu.org/licenses/>.
#
# Description
#   Zsh auto-completion script for the rainbow command.
# --------------------------------------------------------------------------------------------------


typeset -A opt_args
local context state line curcontext="$curcontext"

_arguments \
  '(- 1 *)'{-h,--help}'[print program usage]' \
  '(- 1 *)--version[print program version]' \
  '*'{-v,--verbose}'[verbose mode]' \
  '--disable-stderr-filtering[disable STDERR filtering]' \
  {-f,--config}'[rainbow config file]:rainbow config:_files -W "( $(pwd) ~/.rainbow /usr/share/rainbow/configs )" -g "*.cfg(\:r\:t)"' \
  {-r+,--red}'[display pattern in red]' \
  {-g+,--green}'[display pattern in green]' \
  {-y+,--yellow}'[display pattern in yellow]' \
  {-b+,--blue}'[display pattern in blue]' \
  {-m+,--magenta}'[display pattern in magenta]' \
  {-c+,--cyan}'[display pattern in cyan]' \
  '--start-red[toggle foreground color to red at pattern]' \
  '--start-green[toggle foreground color to green at pattern]' \
  '--start-yellow[toggle foreground color to yellow at pattern]' \
  '--start-blue[toggle foreground color to blue at pattern]' \
  '--start-magenta[toggle foreground color to magenta at pattern]' \
  '--start-cyan[toggle foreground color to cyan at pattern]' \
  '--reset-color[reset foreground color at pattern]' \
  {-R+,--bred}'[display pattern in red background]' \
  {-G+,--bgreen}'[display pattern in green background]' \
  {-Y+,--byellow}'[display pattern in yellow background]' \
  {-B+,--bblue}'[display pattern in blue background]' \
  {-M+,--bmagenta}'[display pattern in magenta background]' \
  {-C+,--bcyan}'[display pattern in cyan background]' \
  '--start-bred[toggle background color to red at pattern]' \
  '--start-bgreen[toggle background color to green at pattern]' \
  '--start-byellow[toggle background color to yellow at pattern]' \
  '--start-bblue[toggle background color to blue at pattern]' \
  '--start-bmagenta[toggle background color to magenta at pattern]' \
  '--start-bcyan[toggle background color to cyan at pattern]' \
  '--reset-bcolor[reset background color at pattern]' \
  '--bold[display pattern in bold]' \
  '--faint[display pattern with decreased intensity]' \
  '--start-bold[toggle bold on at pattern]' \
  '--start-faint[toggle faint on at pattern]' \
  '--reset-intensity[reset text intensity at pattern]' \
  '--italic[display pattern in italic]' \
  '--underline[display pattern underlined]' \
  '--underline-double[display pattern double underlined]' \
  '--blink[display pattern blinking]' \
  '--blink-rapid[display pattern blinking]' \
  '--negative[display pattern swapping foreground and background]' \
  '--hide[hide pattern]'

# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
# vim: ft=zsh sw=2 ts=2 et
