1
0
Fork 0
mirror of https://github.com/zdharma-continuum/fast-syntax-highlighting.git synced 2025-02-25 01:29:29 +01:00
fast-syntax-highlighting/_fast-theme
2018-05-27 16:56:51 +02:00

29 lines
696 B
Text

#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_BASE_DIR"/themes/*.ini(:t:r) )
_wanted themes expl "Themes" \
compadd "$@" -a - themes && ret=0
_arguments -s $arguments && ret=0
return $ret