Skip to content
Snippets Groups Projects
Commit 656fbc54 authored by Nayef Ghattas's avatar Nayef Ghattas
Browse files

first commit

parents
No related branches found
No related tags found
No related merge requests found
_boilr 0 → 100644
#compdef boilr
# Description
# -----------
# zsh completion for boilr
# https://github.com/gandem/boilr-zsh-completion
# -------------------------------------------------------------------------
# Version
# -------
# 1.0.0
# -------------------------------------------------------------------------
# Authors
# -------
# * Nayef Ghattas <nayef.ghattas@gmail.com>
# -------------------------------------------------------------------------
local curcontext="$curcontext" state line _packages _opts ret=1
_arguments -C \
'--help[display help information]:help:->help' \
'1: :->cmds' \
'2: :->args' \
'3: :->options' \
'4: :->dir' && ret=0
case $state in
help)
ret=0
;;
cmds)
_values "boilr commands" \
"init[Initialize directories required by boilr]" \
"report[Create an issue in the github repository]" \
"template[Run a template command]" \
"version[Show the boilr version information]"
ret=0
;;
args)
case $line[1] in
template)
_values "template commands" \
"delete[Delete a project template from the template registry]" \
"download[Download a projet template from a github repository to template registry]" \
"list[List project template found in the local template registry]" \
"save[Save a project template to local template registry]" \
"use[Execute a project template in the given directory]" \
"validate[Validate a template]"
ret=0
;;
esac
;;
options)
case $line[1] in
template)
case $line[2] in
delete)
_alternative "templates:template:($(boilr template list --dont-prettify))"
;;
save)
_alternative "templates:template:{_path_files -/}" "dirs:dirs:{_values 'dirs' '.' '..'}"
;;
use)
_alternative "templates:template:($(boilr template list --dont-prettify))"
;;
validate)
_alternative "templates:template:{_path_files -/}" "dirs:dirs:{_values 'dirs' '.' '..'}"
esac
ret=0
;;
esac
;;
dir)
case $line[1] in
template)
case $line[2] in
use)
_alternative "templates:template:{_path_files -/}" "dirs:dirs:{_values 'dirs' '.' '..'}"
;;
esac
ret=0
;;
esac
;;
esac
return ret
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment