Permalink
Browse files

completions

  • Loading branch information...
1 parent b2b155e commit 8ec23817f393b30b98fc58a66bc40bc3f42f94cc myfreeweb committed Sep 25, 2011
View
@@ -0,0 +1,3 @@
+[submodule "completion"]
+ path = completion
+ url = git://github.com/zsh-users/zsh-completions.git
Submodule completion added at 195a15
View
@@ -1,69 +0,0 @@
-#compdef brew
-#autoload
-
-# imported from the latest homebrew contributions
-
-_brew_all_formulae() {
- formulae=(`brew search`)
-}
-
-_brew_installed_formulae() {
- installed_formulae=(`brew list`)
-}
-
-local -a _1st_arguments
-_1st_arguments=(
- 'cat:display formula file for a formula'
- 'cleanup:uninstall unused and old versions of packages'
- 'create:create a new formula'
- 'deps:list dependencies and dependants of a formula'
- 'doctor:audits your installation for common issues'
- 'edit:edit a formula'
- 'home:visit the homepage of a formula or the brew project'
- 'info:information about a formula'
- 'install:install a formula'
- 'link:link a formula'
- 'list:list files in a formula or not-installed formulae'
- 'log:git commit log for a formula'
- 'outdated:list formulas for which a newer version is available'
- 'prune:remove dead links'
- 'remove:remove a formula'
- 'search:search for a formula (/regex/ or string)'
- 'unlink:unlink a formula'
- 'update:freshen up links'
- 'uses:show formulas which depend on a formula'
-)
-
-local expl
-local -a formula installed_formulae
-
-_arguments \
- '(-v --verbose)'{-v,--verbose}'[verbose]' \
- '(--version)--version[version information]' \
- '(--prefix)--prefix[where brew lives on this system]' \
- '(--cache)--cache[brew cache]' \
- '*:: :->subcmds' && return 0
-
-if (( CURRENT == 1 )); then
- _describe -t commands "brew subcommand" _1st_arguments
- return
-fi
-
-case "$words[1]" in
- list)
- _arguments \
- '(--unbrewed)--unbrewed[files in brew --prefix not controlled by brew]' \
- '1: :->forms' && return 0
-
- if [[ "$state" == forms ]]; then
- _brew_installed_formulae
- _requested installed_formulae expl 'installed formulae' compadd -a installed_formulae
- fi ;;
- install|home|log|info|uses|cat|deps)
- _brew_all_formulae
- _wanted formulae expl 'all formulae' compadd -a formulae ;;
- remove|edit|xo)
- _brew_installed_formulae
- _wanted installed_formulae expl 'installed formulae' compadd -a installed_formulae ;;
-esac
-
View
@@ -1,12 +0,0 @@
-#compdef cake
-#autoload
-
-# based on rake from https://github.com/ryanb/dotfiles
-
-if [ -f Cakefile ]; then
- recent=`last_modified .cake_tasks Cakefile`
- if [[ $recent != '.cake_tasks' ]]; then
- cake | cut -d " " -f 2 | sed -e 's/options://g' -e '/^$/d' > .cake_tasks
- fi
- compadd `cat .cake_tasks`
-fi
View
@@ -1,23 +0,0 @@
-#compdef cap
-#autoload
-
-_cap_does_task_list_need_generating() {
- if [ ! -f .cap_tasks~ ]; then return 0;
- else
- accurate=$(stat -f%m .cap_tasks~)
- changed=$(stat -f%m config/deploy.rb)
- return $(expr $accurate '>=' $changed)
- fi
-}
-_cap() {
- if [ -f config/deploy.rb ]; then
- if _cap_does_task_list_need_generating; then
- echo "\nGenerating .cap_tasks~..." > /dev/stderr
- cap show_tasks -q | cut -d " " -f 1 | sed -e '/^ *$/D' -e '1,2D'
-> .cap_tasks~
- fi
- compadd `cat .cap_tasks~`
- fi
-}
-
-_cap $@
View
@@ -1,68 +0,0 @@
-#compdef cpanm
-#autoload
-
-##
-# cpanminus Z Shell completion script
-##
-#
-# Current supported cpanm version: 1.4000 (Tue Mar 8 01:00:49 PST 2011)
-#
-# The latest code is always located at:
-# https://github.com/rshhh/cpanminus/blob/master/etc/_cpanm
-#
-
-local arguments curcontext="$curcontext"
-typeset -A opt_args
-
-
-arguments=(
-
-# Commands
-# '(--install -i)'{--install,-i}'[Installs the modules]'
- '(- :)--self-upgrade[Upgrades itself]'
- '(- :)--info[Displays distribution info on CPAN]'
- '(--installdeps)--installdeps[Only install dependencies]'
- '(--look)--look[Download/unpack the distribution and then open the directory with your shell]'
- '(- :)'{--help,-h}'[Displays help information]'
- '(- :)'{--version,-V}'[Displays software version]'
-
-# Options
- {--force,-f}'[Force install]'
- {--notest,-n}'[Do not run unit tests]'
- {--sudo,-S}'[sudo to run install commands]'
- '(-v --verbose --quiet -q)'{--verbose,-v}'[Turns on chatty output]'
- '(-q --quiet --verbose -v)'{--quiet,-q}'[Turns off all output]'
- {--local-lib,-l}'[Specify the install base to install modules]'
- {--local-lib-contained,-L}'[Specify the install base to install all non-core modules]'
- '--mirror[Specify the base URL for the mirror (e.g. http://cpan.cpantesters.org/)]:URLs:_urls'
- '--mirror-only[Use the mirror\''s index file instead of the CPAN Meta DB]'
- '--prompt[Prompt when configure/build/test fails]'
- '--reinstall[Reinstall the distribution even if you already have the latest version installed]'
- '--interactive[Turn on interactive configure]'
-
- '--scandeps[Scan the depencencies of given modules and output the tree in a text format]'
- '--format[Specify what format to display the scanned dependency tree]:scandeps format:(tree json yaml dists)'
-
- '--save-dists[Specify the optional directory path to copy downloaded tarballs]'
-# '--uninst-shadows[Uninstalls the shadow files of the distribution that you\''re installing]'
-
- '--auto-cleanup[Number of days that cpanm\''s work directories expire in. Defaults to 7]'
- '(--no-man-pages)--man-pages[Generates man pages for executables (man1) and libraries (man3)]'
- '(--man-pages)--no-man-pages[Do not generate man pages]'
-
-
- # Note: Normally with "--lwp", "--wget" and "--curl" options set to true (which is the default) cpanm tries LWP,
- # Wget, cURL and HTTP::Tiny (in that order) and uses the first one available.
- # (So that the exclusions are not enabled here for the completion)
- '(--lwp)--lwp[Use LWP module to download stuff]'
- '(--wget)--wget[Use GNU Wget (if available) to download stuff]'
- '(--curl)--curl[Use cURL (if available) to download stuff]'
-
-# Other completions
- '*:Local directory or archive:_files -/ -g "*.(tar.gz|tgz|tar.bz2|zip)(-.)"'
- # '*::args: _normal' # this looks for default files (any files)
-)
-_arguments -s $arguments \
- && return 0
-
-return 1
View
@@ -1,4 +0,0 @@
-#compdef fab
-#autoload
-
-compadd `fab --shortlist`
View
@@ -1,34 +0,0 @@
-#compdef gas
-
-local curcontext="$curcontext" state line cmds ret=1
-
-_arguments -C \
- '(- 1 *)'{-v,--version}'[display version information]' \
- '(-h|--help)'{-h,--help}'[show help information]' \
- '1: :->cmds' \
- '*: :->args' && ret=0
-
-case $state in
- cmds)
- cmds=(
- "version:Prints Gas's version"
- "use:Uses author"
- "show:Shows your current user"
- "list:Lists your authors"
- "import:Imports current user to gasconfig"
- "help:Describe available tasks or one specific task"
- "delete:Deletes author"
- "add:Adds author to gasconfig"
- )
- _describe -t commands 'gas command' cmds && ret=0
- ;;
- args)
- case $line[1] in
- (use|delete)
- _values -S , 'authors' $(cat ~/.gas | sed -n -e 's/^\[\(.*\)\]/\1/p') && ret=0
- ;;
- esac
- ;;
-esac
-
-return ret
View
@@ -1,64 +0,0 @@
-#compdef gem
-#autoload
-
-# gem zsh completion, based on homebrew completion
-
-_gem_installed() {
- installed_gems=(`gem list --local --no-versions`)
-}
-
-local -a _1st_arguments
-_1st_arguments=(
- 'cert:Manage RubyGems certificates and signing settings'
- 'check:Check installed gems'
- 'cleanup:Clean up old versions of installed gems in the local repository'
- 'contents:Display the contents of the installed gems'
- 'dependency:Show the dependencies of an installed gem'
- 'environment:Display information about the RubyGems environment'
- 'fetch:Download a gem and place it in the current directory'
- 'generate_index:Generates the index files for a gem server directory'
- 'help:Provide help on the `gem` command'
- 'install:Install a gem into the local repository'
- 'list:Display gems whose name starts with STRING'
- 'lock:Generate a lockdown list of gems'
- 'mirror:Mirror a gem repository'
- 'outdated:Display all gems that need updates'
- 'owner:Manage gem owners on RubyGems.org.'
- 'pristine:Restores installed gems to pristine condition from files located in the gem cache'
- 'push:Push a gem up to RubyGems.org'
- 'query:Query gem information in local or remote repositories'
- 'rdoc:Generates RDoc for pre-installed gems'
- 'search:Display all gems whose name contains STRING'
- 'server:Documentation and gem repository HTTP server'
- 'sources:Manage the sources and cache file RubyGems uses to search for gems'
- 'specification:Display gem specification (in yaml)'
- 'stale:List gems along with access times'
- 'uninstall:Uninstall gems from the local repository'
- 'unpack:Unpack an installed gem to the current directory'
- 'update:Update the named gems (or all installed gems) in the local repository'
- 'which:Find the location of a library file you can require'
-)
-
-local expl
-local -a gems installed_gems
-
-_arguments \
- '(-v --version)'{-v,--version}'[show version]' \
- '(-h --help)'{-h,--help}'[show help]' \
- '*:: :->subcmds' && return 0
-
-if (( CURRENT == 1 )); then
- _describe -t commands "gem subcommand" _1st_arguments
- return
-fi
-
-case "$words[1]" in
- list)
- if [[ "$state" == forms ]]; then
- _gem_installed
- _requested installed_gems expl 'installed gems' compadd -a installed_gems
- fi ;;
- uninstall|update)
- _gem_installed
- _wanted installed_gems expl 'installed gems' compadd -a installed_gems ;;
-esac
View
@@ -1,40 +0,0 @@
-#compdef github
-#autoload
-
-# in order to make this work, you will need to have the github gem installed
-# http://github.com/defunkt/github-gem
-
-# github zsh completion, based on homebrew completion
-
-local -a _1st_arguments
-_1st_arguments=(
- 'browse:Open this repo in a web browser'
- 'clone:Clone a repo'
- 'config:Automatically set configuration info, or pass args to specify'
- 'create-from-local:Create a new GitHub repository from the current local repository'
- 'create:Create a new empty GitHub repository'
- 'fetch:Fetch from a remote to a local branch'
- 'fetch_all:Fetch all refs from a user'
- 'fork:Forks a GitHub repository'
- 'home:Open this repos master branch in a web browser'
- 'ignore:Ignore a SHA from github network commits'
- 'info:Info about this project'
- 'issues:Project issues tools'
- 'network:Project network tools - sub-commands : web [user], list, fetch, commits'
- 'open:Open the given user/project in a web browser'
- 'pull-request:Generate the text for a pull request'
- 'pull:Pull from a remote'
- 'search:Search GitHub for the given repository name'
- 'track:Track another users repository'
-)
-
-local expl
-local -a pkgs installed_pkgs
-
-_arguments \
- '*:: :->subcmds' && return 0
-
-if (( CURRENT == 1 )); then
- _describe -t commands "github subcommand" _1st_arguments
- return
-fi
Oops, something went wrong.

0 comments on commit 8ec2381

Please sign in to comment.