zdharma-continuum.fast-synt.../_fast-theme

30 lines
696 B
Plaintext

#compdef fast-theme
#
# Copyright (c) 2018 Sebastian Gniazdowski
#
# Completion for theme-switching function, fast-theme,
# part of zdharma/fast-syntax-highlighting.
#
integer ret=1
local -a arguments
arguments=(
{-h,--help}'[display help text]'
{-l,--list}'[list available themes]'
{-r,--reset}'[unset any theme (revert to default highlighting)]'
{-q,--quiet}'[no default messages]'
{-v,--verbose}'[more messages during operation]'
{-t,--test}'[test theme after setting it (show example code)]'
)
typeset -a themes
themes=( "$FAST_WORK_DIR"/themes/*.ini(:t:r) )
_wanted themes expl "Themes" \
compadd "$@" -a - themes && ret=0
_arguments -s $arguments && ret=0
return $ret