initial commit with basic yeoman alias and zsh autocomplete

This commit is contained in:
Sayanee
2013-01-20 19:23:35 +08:00
commit ed7ce5e135
2 changed files with 55 additions and 0 deletions

37
_yeoman Normal file
View File

@@ -0,0 +1,37 @@
#compdef yeoman
#autoload
# yeoman zsh completion - based on the homebrew zsh completion
# requires 'yeoman' to be installed
local -a _1st_arguments
_1st_arguments=(
'init:Initialize and scaffold a new project using generator templates'
'build:Build an optimized version of your app, ready to deploy'
'server:Launch a preview server which will begin watching for changes'
'test:Run a Mocha test harness in a headless PhantomJS'
'install:Install a package from the client-side package registry'
'uninstall:Uninstall the package'
'update:Update a package to the latest version'
'list:List the packages currently installed'
'search:Query the registry for matching package names'
'lookup:Look up info on a particular package'
)
local expl
local -a pkgs installed_pkgs
_arguments \
'(--help)--help[show the help message and quit]' \
'(--version)--version[show version information and quit]' \
'*:: :->subcmds' && return 0
if (( CURRENT == 1 )); then
_describe -t commands "yeoman subcommand" _1st_arguments
return
fi
case "$words[1]" in
init)
compadd generator angular backbone bbb chromeapp ember-starter ember mocha quickstart testacular
esac

18
yeoman.plugin.zsh Normal file
View File

@@ -0,0 +1,18 @@
alias ymget='curl -L get.yeoman.io | bash'
alias ym='yeoman help'
alias ymv='yeoman --version'
alias ymi='yeoman init'
alias ymb='yeoman build'
alias ymsv='yeoman server'
alias ymsd='yeoman server:dist'
alias ymst='yeoman server:test'
alias ymt='yeoman test'
alias ymii='yeoman install'
alias ymui='yeoman uninstall'
alias ymu='yeoman update'
alias yml='yeoman list'
alias yms='yeoman search'
alias ymlu='yeoman lookup'