Permalink
Browse files

Prepare for changes.

  • Loading branch information...
lepture committed Oct 23, 2013
1 parent ba6a02c commit 8bc5d23b8cbac7a0199308897422b8cf58c8b424
Showing with 1 addition and 75 deletions.
  1. +0 −75 oh-my-zsh-plugins/liquidluck/_liquidluck
  2. +1 −0 scripts/liquidluck
@@ -1,75 +0,0 @@
#compdef liquidluck
#autoload
# liquidluck zsh completion, based on homebrew completion
_webhook_subcommand() {
webhook_subcommand=(
'start'
'stop'
'restart'
)
}
_all_themes() {
all_themes=(`liquidluck search -c`)
}
local -a _1st_arguments
_1st_arguments=(
'build:Build the website'
'init:Create a settings file'
'search:Search a theme'
'install:Install a theme'
'webhook:Start webhook server'
'server:Start preview server'
)
local expl
local -a webhook_subcommand all_themes
_arguments \
'(-s --settings)'{-s,--settings}'[specify a setting file]' \
'(-o --output)'{-o,--output}'[overwrite output directory]' \
'(-c --clean)'{-c,--clean}'[show name only]' \
'(-h --help)'{-h,--help}'[show help]' \
'(-q --quiet)'{-q,--quiet}'[give less output]' \
'(-v --verbose)'{-v,--verbose}'[give more output]' \
'(-p --port)'{-p,--port}'[webhook server port]' \
'*:: :->subcmds' && return 0
if (( CURRENT == 1 )); then
_describe -t commands "liquidluck subcommand" _1st_arguments
return
fi
case "$words[1]" in
build)
_arguments \
'(-s --settings)'{-s,--settings}'[specify a setting file]' \
'(-o --output)'{-o,--output}'[overwrite output directory]' \
'(-q --quiet)'{-q,--quiet}'[give less output]' \
'(-v --verbose)'{-v,--verbose}'[give more output]' ;;
init)
_arguments \
'(-s --settings)'{-s,--settings}'[specify a setting file]' ;;
webhook)
_arguments \
'(-p --port)'{-p,--port}'[webhook server port]' \
'(-s --settings)'{-s,--settings}'[specify a setting file]' \
'1: :->webhookcmd' && return 0
if [[ "$state" == webhookcmd ]]; then
_webhook_subcommand
_wanted webhook_subcommand expl 'webhook subcommand' compadd -a webhook_subcommand
fi;;
server)
_arguments \
'(-d --debug)'{-d,--debug}'[set theme.debug=True]' \
'(-p --port)'{-p,--port}'[webhook server port]' \
'(-s --settings)'{-s,--settings}'[specify a setting file]' ;;
search)
_arguments \
'(-c --clean)'{-c,--clean}'[show name only]' ;;
install)
_all_themes
_wanted all_themes expl 'themes' compadd -a all_themes ;;
esac
View
@@ -0,0 +1 @@
#!/usr/bin/env python

0 comments on commit 8bc5d23

Please sign in to comment.