This commit is contained in:
Charles-Pierre Astolfi 2014-07-13 15:48:15 +00:00
commit 032aefc1f1
306 changed files with 334 additions and 2 deletions

0
.gitignore vendored Normal file → Executable file
View file

0
MIT-LICENSE.txt Normal file → Executable file
View file

0
README.textile Normal file → Executable file
View file

0
custom/example.zsh Normal file → Executable file
View file

0
custom/plugins/example/example.plugin.zsh Normal file → Executable file
View file

0
lib/aliases.zsh Normal file → Executable file
View file

0
lib/completion.zsh Normal file → Executable file
View file

0
lib/correction.zsh Normal file → Executable file
View file

0
lib/directories.zsh Normal file → Executable file
View file

0
lib/functions.zsh Normal file → Executable file
View file

0
lib/git.zsh Normal file → Executable file
View file

0
lib/grep.zsh Normal file → Executable file
View file

0
lib/history.zsh Normal file → Executable file
View file

0
lib/key-bindings.zsh Normal file → Executable file
View file

0
lib/misc.zsh Normal file → Executable file
View file

0
lib/spectrum.zsh Normal file → Executable file
View file

0
lib/termsupport.zsh Normal file → Executable file
View file

0
lib/theme-and-appearance.zsh Normal file → Executable file
View file

0
log/.easter-egg Normal file → Executable file
View file

0
oh-my-zsh.sh Normal file → Executable file
View file

0
plugins/ant/ant.plugin.zsh Normal file → Executable file
View file

0
plugins/apache2-macports/apache2-macports.plugin.zsh Normal file → Executable file
View file

0
plugins/archlinux/archlinux.plugin.zsh Normal file → Executable file
View file

0
plugins/autoenv/autoenv.plugin.zsh Normal file → Executable file
View file

0
plugins/autojump/autojump.plugin.zsh Normal file → Executable file
View file

0
plugins/battery/battery.plugin.zsh Normal file → Executable file
View file

0
plugins/bower/bower.plugin.zsh Normal file → Executable file
View file

0
plugins/brew/_brew Normal file → Executable file
View file

0
plugins/brew/brew.plugin.zsh Normal file → Executable file
View file

0
plugins/bundler/_bundler Normal file → Executable file
View file

0
plugins/bundler/bundler.plugin.zsh Normal file → Executable file
View file

0
plugins/bwana/bwana.plugin.zsh Normal file → Executable file
View file

0
plugins/cake/cake.plugin.zsh Normal file → Executable file
View file

0
plugins/capistrano/_capistrano Normal file → Executable file
View file

0
plugins/cloudapp/cloudapp.plugin.zsh Normal file → Executable file
View file

0
plugins/coffee/_coffee Normal file → Executable file
View file

0
plugins/colemak/colemak-less Normal file → Executable file
View file

0
plugins/colemak/colemak.plugin.zsh Normal file → Executable file
View file

0
plugins/colored-man/colored-man.plugin.zsh Normal file → Executable file
View file

0
plugins/colorize/colorize.plugin.zsh Normal file → Executable file
View file

0
plugins/command-not-found/command-not-found.plugin.zsh Normal file → Executable file
View file

0
plugins/compleat/compleat.plugin.zsh Normal file → Executable file
View file

0
plugins/composer/composer.plugin.zsh Normal file → Executable file
View file

0
plugins/copydir/copydir.plugin.zsh Normal file → Executable file
View file

0
plugins/copyfile/copyfile.plugin.zsh Normal file → Executable file
View file

0
plugins/cp/cp.plugin.zsh Normal file → Executable file
View file

0
plugins/cpanm/_cpanm Normal file → Executable file
View file

0
plugins/debian/debian.plugin.zsh Normal file → Executable file
View file

0
plugins/dircycle/dircycle.plugin.zsh Normal file → Executable file
View file

0
plugins/dirpersist/dirpersist.plugin.zsh Normal file → Executable file
View file

0
plugins/django/django.plugin.zsh Normal file → Executable file
View file

0
plugins/emoji-clock/emoji-clock.plugin.zsh Normal file → Executable file
View file

0
plugins/encode64/encode64.plugin.zsh Normal file → Executable file
View file

0
plugins/extract/_extract Normal file → Executable file
View file

0
plugins/extract/extract.plugin.zsh Normal file → Executable file
View file

0
plugins/fabric/_fab Normal file → Executable file
View file

0
plugins/fabric/fabric.plugin.zsh Normal file → Executable file
View file

0
plugins/fasd/fasd.plugin.zsh Normal file → Executable file
View file

0
plugins/fbterm/fbterm.plugin.zsh Normal file → Executable file
View file

0
plugins/forklift/forklift.plugin.zsh Normal file → Executable file
View file

0
plugins/gas/_gas Normal file → Executable file
View file

0
plugins/gem/_gem Normal file → Executable file
View file

0
plugins/git-extras/git-extras.plugin.zsh Normal file → Executable file
View file

0
plugins/git-flow-avh/git-flow-avh.plugin.zsh Normal file → Executable file
View file

0
plugins/git-flow/git-flow.plugin.zsh Normal file → Executable file
View file

0
plugins/git-hubflow/git-hubflow.plugin.zsh Normal file → Executable file
View file

0
plugins/git-remote-branch/git-remote-branch.plugin.zsh Normal file → Executable file
View file

0
plugins/git/git.plugin.zsh Normal file → Executable file
View file

0
plugins/gitfast/_git Normal file → Executable file
View file

0
plugins/gitfast/git-completion.bash Normal file → Executable file
View file

0
plugins/gitfast/git-prompt.sh Normal file → Executable file
View file

0
plugins/gitfast/gitfast.plugin.zsh Normal file → Executable file
View file

0
plugins/github/_github Normal file → Executable file
View file

0
plugins/github/github.plugin.zsh Normal file → Executable file
View file

0
plugins/gnu-utils/gnu-utils.plugin.zsh Normal file → Executable file
View file

View file

@ -1 +0,0 @@
../golang/golang.plugin.zsh

151
plugins/go/go.plugin.zsh Executable file
View file

@ -0,0 +1,151 @@
# install in /etc/zsh/zshrc or your personal .zshrc
# gc
prefixes=(5 6 8)
for p in $prefixes; do
compctl -g "*.${p}" ${p}l
compctl -g "*.go" ${p}g
done
# standard go tools
compctl -g "*.go" gofmt
# gccgo
compctl -g "*.go" gccgo
# go tool
__go_tool_complete() {
typeset -a commands build_flags
commands+=(
'build[compile packages and dependencies]'
'clean[remove object files]'
'doc[run godoc on package sources]'
'fix[run go tool fix on packages]'
'fmt[run gofmt on package sources]'
'get[download and install packages and dependencies]'
'help[display help]'
'install[compile and install packages and dependencies]'
'list[list packages]'
'run[compile and run Go program]'
'test[test packages]'
'tool[run specified go tool]'
'version[print Go version]'
'vet[run go tool vet on packages]'
)
if (( CURRENT == 2 )); then
# explain go commands
_values 'go tool commands' ${commands[@]}
return
fi
build_flags=(
'-a[force reinstallation of packages that are already up-to-date]'
'-n[print the commands but do not run them]'
"-p[number of parallel builds]:number"
'-x[print the commands]'
"-work[print temporary directory name and keep it]"
"-gcflags[flags for 5g/6g/8g]:flags"
"-ldflags[flags for 5l/6l/8l]:flags"
"-gccgoflags[flags for gccgo]:flags"
)
__go_list() {
local expl importpaths
declare -a importpaths
importpaths=($(go list ${words[$CURRENT]}... 2>/dev/null))
_wanted importpaths expl 'import paths' compadd "$@" - "${importpaths[@]}"
}
case ${words[2]} in
clean|doc)
_arguments -s -w : '*:importpaths:__go_list'
;;
fix|fmt|list|vet)
_alternative ':importpaths:__go_list' ':files:_path_files -g "*.go"'
;;
install)
_arguments -s -w : ${build_flags[@]} \
"-v[show package names]" \
'*:importpaths:__go_list'
;;
get)
_arguments -s -w : \
${build_flags[@]}
;;
build)
_arguments -s -w : \
${build_flags[@]} \
"-v[show package names]" \
"-o[output file]:file:_files" \
"*:args:{ _alternative ':importpaths:__go_list' ':files:_path_files -g \"*.go\"' }"
;;
test)
_arguments -s -w : \
${build_flags[@]} \
"-c[do not run, compile the test binary]" \
"-i[do not run, install dependencies]" \
"-v[print test output]" \
"-x[print the commands]" \
"-short[use short mode]" \
"-parallel[number of parallel tests]:number" \
"-cpu[values of GOMAXPROCS to use]:number list" \
"-run[run tests and examples matching regexp]:regexp" \
"-bench[run benchmarks matching regexp]:regexp" \
"-benchtime[run each benchmark during n seconds]:duration" \
"-timeout[kill test after that duration]:duration" \
"-cpuprofile[write CPU profile to file]:file:_files" \
"-memprofile[write heap profile to file]:file:_files" \
"-memprofilerate[set heap profiling rate]:number" \
"*:args:{ _alternative ':importpaths:__go_list' ':files:_path_files -g \"*.go\"' }"
;;
help)
_values "${commands[@]}" \
'gopath[GOPATH environment variable]' \
'importpath[description of import paths]' \
'remote[remote import path syntax]' \
'testflag[description of testing flags]' \
'testfunc[description of testing functions]'
;;
run)
_arguments -s -w : \
${build_flags[@]} \
'*:file:_path_files -g "*.go"'
;;
tool)
if (( CURRENT == 3 )); then
_values "go tool" $(go tool)
return
fi
case ${words[3]} in
[568]g)
_arguments -s -w : \
'-I[search for packages in DIR]:includes:_path_files -/' \
'-L[show full path in file:line prints]' \
'-S[print the assembly language]' \
'-V[print the compiler version]' \
'-e[no limit on number of errors printed]' \
'-h[panic on an error]' \
'-l[disable inlining]' \
'-m[print optimization decisions]' \
'-o[file specify output file]:file' \
'-p[assumed import path for this code]:importpath' \
'-u[disable package unsafe]' \
"*:file:_files -g '*.go'"
;;
[568]l)
local O=${words[3]%l}
_arguments -s -w : \
'-o[file specify output file]:file' \
'-L[search for packages in DIR]:includes:_path_files -/' \
"*:file:_files -g '*.[ao$O]'"
;;
dist)
_values "dist tool" banner bootstrap clean env install version
;;
*)
# use files by default
_files
;;
esac
;;
esac
}
compdef __go_tool_complete go

0
plugins/golang/golang.plugin.zsh Normal file → Executable file
View file

0
plugins/gpg-agent/gpg-agent.plugin.zsh Normal file → Executable file
View file

0
plugins/gradle/gradle.plugin.zsh Normal file → Executable file
View file

0
plugins/heroku/_heroku Normal file → Executable file
View file

0
plugins/history-substring-search/README Normal file → Executable file
View file

View file

View file

0
plugins/history/history.plugin.zsh Normal file → Executable file
View file

0
plugins/jake-node/jake-node.plugin.zsh Normal file → Executable file
View file

0
plugins/jira/jira.plugin.zsh Normal file → Executable file
View file

0
plugins/kate/kate.plugin.zsh Normal file → Executable file
View file

0
plugins/knife/_knife Normal file → Executable file
View file

0
plugins/laravel/_artisan Normal file → Executable file
View file

0
plugins/laravel/laravel.plugin.zsh Normal file → Executable file
View file

0
plugins/last-working-dir/last-working-dir.plugin.zsh Normal file → Executable file
View file

0
plugins/lein/lein.plugin.zsh Normal file → Executable file
View file

0
plugins/lighthouse/lighthouse.plugin.zsh Normal file → Executable file
View file

0
plugins/lol/lol.plugin.zsh Normal file → Executable file
View file

0
plugins/macports/_port Normal file → Executable file
View file

0
plugins/macports/macports.plugin.zsh Normal file → Executable file
View file

0
plugins/mercurial/mercurial.plugin.zsh Normal file → Executable file
View file

0
plugins/mvn/mvn.plugin.zsh Normal file → Executable file
View file

0
plugins/mysql-macports/mysql-macports.plugin.zsh Normal file → Executable file
View file

Some files were not shown because too many files have changed in this diff Show more