Unverified Commit 0232ac4b authored by Marc Cornellà's avatar Marc Cornellà Committed by GitHub
Browse files

Merge branch 'master' into master

parents afb02876 ebc700be
############################################################################## ##############################################################################
# A descriptive listing of core Gradle commands # A descriptive listing of core Gradle commands
############################################################################ ############################################################################
gradle-or-gradlew() {
if [ -f ./gradlew ] ; then
echo "executing gradlew instead of gradle";
./gradlew "$@";
else
gradle "$@";
fi
}
alias gradle=gradle-or-gradlew;
function _gradle_core_commands() { function _gradle_core_commands() {
local ret=1 state local ret=1 state
_arguments ':subcommand:->subcommand' && ret=0 _arguments ':subcommand:->subcommand' && ret=0
...@@ -88,7 +100,7 @@ function _gradle_arguments() { ...@@ -88,7 +100,7 @@ function _gradle_arguments() {
# and if so, regenerate the .gradle_tasks cache file # and if so, regenerate the .gradle_tasks cache file
############################################################################ ############################################################################
_gradle_does_task_list_need_generating () { _gradle_does_task_list_need_generating () {
[[ ! -f .gradletasknamecache ]] || [[ build.gradle -nt .gradletasknamecache ]] [[ ! -f .gradletasknamecache ]] || [[ build.gradle -nt .gradletasknamecache || build.gradle.kts -nt .gradletasknamecache ]]
} }
############## ##############
...@@ -144,7 +156,7 @@ _gradle_parse_and_extract_tasks () { ...@@ -144,7 +156,7 @@ _gradle_parse_and_extract_tasks () {
# Discover the gradle tasks by running "gradle tasks --all" # Discover the gradle tasks by running "gradle tasks --all"
############################################################################ ############################################################################
_gradle_tasks () { _gradle_tasks () {
if [[ -f build.gradle ]]; then if [[ -f build.gradle || -f build.gradle.kts || -f settings.gradle || -f settings.gradle.kts ]]; then
_gradle_arguments _gradle_arguments
if _gradle_does_task_list_need_generating; then if _gradle_does_task_list_need_generating; then
_gradle_parse_and_extract_tasks "$(gradle tasks --all)" > .gradletasknamecache _gradle_parse_and_extract_tasks "$(gradle tasks --all)" > .gradletasknamecache
...@@ -154,7 +166,7 @@ _gradle_tasks () { ...@@ -154,7 +166,7 @@ _gradle_tasks () {
} }
_gradlew_tasks () { _gradlew_tasks () {
if [[ -f build.gradle ]]; then if [[ -f build.gradle || -f build.gradle.kts || -f settings.gradle || -f settings.gradle.kts ]]; then
_gradle_arguments _gradle_arguments
if _gradle_does_task_list_need_generating; then if _gradle_does_task_list_need_generating; then
_gradle_parse_and_extract_tasks "$(./gradlew tasks --all)" > .gradletasknamecache _gradle_parse_and_extract_tasks "$(./gradlew tasks --all)" > .gradletasknamecache
......
# Grails plugin
This plugin adds completion for the [Grails 2 CLI](https://grails.github.io/grails2-doc/2.5.x/guide/commandLine.html)
To use it, add `grails` to the plugins array in your zshrc file:
```zsh
plugins=(... grails)
```
It looks for scripts in the following paths:
- `$GRAILS_HOME/scripts`
- `~/.grails/scripts`
- `./scripts`
- `./plugins/*/scripts`
## Grails Commands
- `add-proxy`
- `alias`
- `bootstrap`
- `bug-report`
- `clean`
- `clean-all`
- `clear-proxy`
- `compile`
- `console`
- `create-app`
- `create-controller`
- `create-domain-class`
- `create-filters`
- `create-integration-test`
- `create-multi-project-build`
- `create-plugin`
- `create-pom`
- `create-script`
- `create-service`
- `create-tag-lib`
- `create-unit-test`
- `dependency-report`
- `doc`
- `help`
- `init`
- `install-app-templates`
- `install-dependency`
- `install-plugin`
- `install-templates`
- `integrate-with`
- `interactive`
- `list-plugin-updates`
- `list-plugins`
- `migrate-docs`
- `package`
- `package-plugin`
- `plugin-info`
- `refresh-dependencies`
- `remove-proxy`
- `run-app`
- `run-script`
- `run-war`
- `set-grails-version`
- `set-proxy`
- `set-version`
- `shell`
- `stats`
- `stop-app`
- `test-app`
- `uninstall-plugin`
- `url-mappings-report`
- `war`
- `wrapper`
# grunt plugin
This plugin adds completions for [grunt](https://github.com/gruntjs/grunt).
To use it, add `grunt` to the plugins array of your `.zshrc` file:
```zsh
plugins=(... grunt)
```
## Enable caching
If you want to use the cache, set the following in your `.zshrc`:
```zsh
zstyle ':completion:*' use-cache yes
```
## Settings
* Show grunt file path:
```zsh
zstyle ':completion::complete:grunt::options:' show_grunt_path yes
```
* Cache expiration days (default: 7):
```zsh
zstyle ':completion::complete:grunt::options:' expire 1
```
* Not update options cache if target gruntfile is changed.
```zsh
zstyle ':completion::complete:grunt::options:' no_update_options yes
```
Note that if you change the zstyle settings, you should delete the cache file and restart zsh.
```zsh
$ rm ~/.zcompcache/grunt
$ exec zsh
```
# gulp plugin
This plugin adds autocompletion for your [`gulp`](https://gulpjs.com/) tasks. It grabs all available tasks from the `gulpfile.js` in the current directory.
To use it, add `gulp` to the plugins array of your `.zshrc` file:
```
plugins=(... gulp)
```
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
# #
# André König # André König
# Github: https://github.com/akoenig # GitHub: https://github.com/akoenig
# Twitter: https://twitter.com/caiifr # Twitter: https://twitter.com/caiifr
# #
...@@ -19,11 +19,11 @@ ...@@ -19,11 +19,11 @@
# Grabs all available tasks from the `gulpfile.js` # Grabs all available tasks from the `gulpfile.js`
# in the current directory. # in the current directory.
# #
function $$gulp_completion { function _gulp_completion {
compls=$(gulp --tasks-simple 2>/dev/null) compls=$(gulp --tasks-simple 2>/dev/null)
completions=(${=compls}) completions=(${=compls})
compadd -- $completions compadd -- $completions
} }
compdef $$gulp_completion gulp compdef _gulp_completion gulp
# Hanami Plugin #
This plugin adds convenient ways to work with [Hanami](https://hanamirb.org/) via console.
It's inspired by Rails plugin, so if you've used it, you'll feel like home.
## Usage ##
For example, type `hc` into your console when you're within Hanami project directory to run
the application console. Have a look at available shortcuts below. You can read more about
these commands [on the official website](https://hanamirb.org/guides/command-line/applications/).
## Aliases ##
| Alias | Command | Description |
|-------|---------------------------|---------------------------------------------------------|
| HED | HANAMI_ENV=development | Set environment variable HANAMI_ENV to development |
| HEP | HANAMI_ENV=production | Set environment variable HANAMI_ENV to production |
| HET | HANAMI_ENV=test | Set environment variable HANAMI_ENV to test |
| hc | hanami console | Run application console |
| hd | hanami destroy | Remove specified hanami resource |
| hg | hanami generate | Create specified hanami resource |
| hgm | hanami generate migration | Create migration file |
| hs | hanami server | Launch server with hanami application |
| hsp | hanami server -p | Launch server with specified port |
| hr | hanami routes | List application routes |
| hdc | hanami db create | Create application database |
| hdd | hanami db drop | Delete application database |
| hdp | hanami db prepare | Prepare database for the current environment |
| hda | hanami db apply | Recreates a fresh schema after migrations (destructive) |
| hdv | hanami db version | Print current database version |
| hdrs | hdd && hdp | Drop and recreate application database |
| hdtp | HET hdp | Actualize test environment database |
| hrg | hr | grep | Grep hanami routes with specified pattern |
alias -g HED='HANAMI_ENV=development'
alias -g HEP='HANAMI_ENV=production'
alias -g HET='HANAMI_ENV=test'
alias hc='hanami console'
alias hd='hanami destroy'
alias hg='hanami generate'
alias hgm='hanami generate migration'
alias hs='hanami server'
alias hsp='hanami server -p'
alias hr='hanami routes'
alias hdc='hanami db create'
alias hdd='hanami db drop'
alias hdp='hanami db prepare'
alias hda='hanami db apply'
alias hdv='hanami db version'
alias hdrs='hdd && hdp'
alias hdtp='HET hdp'
alias hrg='hr | grep'
# Helm plugin
This plugin adds completion for [Helm](https://helm.sh/), the Kubernetes package manager.
To use it, add `helm` to the plugins array in your zshrc file:
```zsh
plugins=(... helm)
```
# Heroku
This plugin provides completion for the [Heroku CLI](https://devcenter.heroku.com/articles/heroku-cli).
To use it add heroku to the plugins array in your zshrc file:
```bash
plugins=(... heroku)
```
#compdef heroku
# Heroku Autocomplete plugin for Oh-My-Zsh
# Requires: The Heroku client gem (https://github.com/heroku/heroku)
# Author: Ali B. (http://awhitebox.com)
local -a _1st_arguments
_1st_arguments=(
"account\:confirm_billing":"Confirm that your account can be billed at the end of the month"
"addons":"list installed addons"
"addons\:list":"list all available addons"
"addons\:add":"install an addon"
"addons\:upgrade":"upgrade an existing addon"
"addons\:downgrade":"downgrade an existing addon"
"addons\:remove":"uninstall an addon"
"addons\:open":"open an addon's dashboard in your browser"
"apps":"list your apps"
"apps\:info":"show detailed app information"
"apps\:create":"create a new app"
"apps\:rename":"rename the app"
"apps\:open":"open the app in a web browser"
"apps\:destroy":"permanently destroy an app"
"auth\:login":"log in with your heroku credentials"
"auth\:logout":"clear local authentication credentials"
"config":"display the config vars for an app"
"config\:pull":"pull heroku config vars down to the local environment"
"config\:push":"push local config vars to heroku"
"config\:set":"set one or more config vars"
"config\:unset":"unset one or more config vars"
"domains":"list custom domains for an app"
"domains\:add":"add a custom domain to an app"
"domains\:remove":"remove a custom domain from an app"
"domains\:clear":"remove all custom domains from an app"
"features":"list available app features"
"features\:disable":"disables a feature"
"features\:enable":"enables an feature"
"features\:info":"displays additional information about feature"
"help":"list available commands or display help for a specific command"
"keys":"display keys for the current user"
"keys\:add":"add a key for the current user"
"keys\:remove":"remove a key from the current user"
"keys\:clear":"remove all authentication keys from the current user"
"logs":"display recent log output"
"logs\:cron":"DEPRECATED: display cron logs from legacy logging"
"logs\:drains":"manage syslog drains"
"maintenance\:on":"put the app into maintenance mode"
"maintenance\:off":"take the app out of maintenance mode"
"pg\:credentials":"display the DATABASE credentials"
"pg\:diagnose":"run diagnostics report on DATABASE"
"pg\:info":"display database information"
"pg\:kill":"kill a query"
"pg\:killall":"terminates ALL connections"
"pg\:maintenance":"manage maintenance for DATABASE"
"pg\:promote":"sets DATABASE as your DATABASE_URL"
"pg\:ps":"view active queries with execution time"
"pg\:psql":"open a psql shell to the database"
"pg\:pull":"pull from REMOTE_SOURCE_DATABASE to LOCAL_TARGET_DATABASE"
"pg\:push":"push from LOCAL_SOURCE_DATABASE to REMOTE_TARGET_DATABASE"
"pg\:reset":"delete all data in DATABASE"
"pg\:unfollow":"stop a replica from following and make it a read/write database"
"pg\:upgrade":"unfollow a database and upgrade it to the latest PostgreSQL version"
"pg\:wait":"monitor database creation, exit when complete"
"pgbackups":"list captured backups"
"pgbackups\:url":"get a temporary URL for a backup"
"pgbackups\:capture":"capture a backup from a database id"
"pgbackups\:restore":"restore a backup to a database"
"pgbackups\:destroy":"destroys a backup"
"plugins":"list installed plugins"
"plugins\:install":"install a plugin"
"plugins\:uninstall":"uninstall a plugin"
"ps\:dynos":"scale to QTY web processes"
"ps\:workers":"scale to QTY background processes"
"ps":"list processes for an app"
"ps\:restart":"restart an app process"
"ps\:scale":"scale processes by the given amount"
"releases":"list releases"
"releases\:info":"view detailed information for a release"
"rollback":"roll back to an older release"
"run":"run an attached process"
"run\:rake":"remotely execute a rake command"
"run\:console":"open a remote console session"
"sharing":"list collaborators on an app"
"sharing\:add":"add a collaborator to an app"
"sharing\:remove":"remove a collaborator from an app"
"sharing\:transfer":"transfer an app to a new owner"
"ssl":"list certificates for an app"
"ssl\:add":"add an ssl certificate to an app"
"ssl\:remove":"remove an ssl certificate from an app"
"ssl\:clear":"remove all ssl certificates from an app"
"stack":"show the list of available stacks"
"stack\:migrate":"prepare migration of this app to a new stack"
"version":"show heroku client version"
)
_arguments '*:: :->command'
if (( CURRENT == 1 )); then
_describe -t commands "heroku command" _1st_arguments
return
fi
local -a _command_args
case "$words[1]" in
apps:info)
_command_args=(
'(-r|--raw)'{-r,--raw}'[output info as raw key/value pairs]' \
)
;;
apps:create)
_command_args=(
'(-a|--addons)'{-a,--addons}'[a list of addons to install]' \
'(-r|--remote)'{-r,--remote}'[the git remote to create, default "heroku"]' \
'(-s|--stack)'{-s,--stack}'[the stack on which to create the app]' \
)
;;
config)
_command_args=(
'(-s|--shell)'{-s,--shell}'[output config vars in shell format]' \
)
;;
keys)
_command_args=(
'(-l|--long)'{-l,--long}'[display extended information for each key]' \
)
;;
logs)
_command_args=(
'(-n|--num)'{-n,--num}'[the number of lines to display]' \
'(-p|--ps)'{-p,--ps}'[only display logs from the given process]' \
'(-s|--source)'{-s,--source}'[only display logs from the given source]' \
'(-t|--tail)'{-t,--tail}'[continually stream logs]' \
)
;;
pgbackups:capture)
_command_args=(
'(-e|--expire)'{-e,--expire}'[if no slots are available to capture, delete the oldest backup to make room]' \
)
;;
stack)
_command_args=(
'(-a|--all)'{-a,--all}'[include deprecated stacks]' \
)
;;
esac
_arguments \
$_command_args \
'(--app)--app[the app name]' \
'(--remote)--remote[the remote name]' \
'(--help)--help[help about the current command]' \
&& return 0
HEROKU_AC_CACHE_DIR="$HOME/.cache"
if [ "$(uname -s)" = "Darwin" ]; then
HEROKU_AC_CACHE_DIR="$HOME/Library/Caches"
fi
if [ ! -z "$XDG_CACHE_HOME" ]; then
HEROKU_AC_CACHE_DIR="$XDG_CACHE_DIR"
fi
HEROKU_AC_ZSH_SETUP_PATH=$HEROKU_AC_CACHE_DIR/heroku/autocomplete/zsh_setup
[ -f $HEROKU_AC_ZSH_SETUP_PATH ] && source $HEROKU_AC_ZSH_SETUP_PATH
...@@ -6,9 +6,9 @@ feature, where you can type in any part of any previously entered command ...@@ -6,9 +6,9 @@ feature, where you can type in any part of any previously entered command
and press the UP and DOWN arrow keys to cycle through the matching commands. and press the UP and DOWN arrow keys to cycle through the matching commands.
You can also use K and J in VI mode or ^P and ^N in EMACS mode for the same. You can also use K and J in VI mode or ^P and ^N in EMACS mode for the same.
[1]: http://fishshell.com [1]: https://fishshell.com
[2]: http://www.zsh.org/mla/users/2009/msg00818.html [2]: https://www.zsh.org/mla/users/2009/msg00818.html
[3]: http://sourceforge.net/projects/fizsh/ [3]: https://sourceforge.net/projects/fizsh/
[4]: https://github.com/robbyrussell/oh-my-zsh/pull/215 [4]: https://github.com/robbyrussell/oh-my-zsh/pull/215
[5]: https://github.com/zsh-users/zsh-history-substring-search [5]: https://github.com/zsh-users/zsh-history-substring-search
[6]: https://github.com/zsh-users/zsh-syntax-highlighting [6]: https://github.com/zsh-users/zsh-syntax-highlighting
......
# Homestead
This plugin provides completion for [Homestead](https://laravel.com/docs/homestead).
To use it add homestead to the plugins array in your zshrc file.
```bash
plugins=(... homestead)
```
# Homestead basic command completion
_homestead_get_command_list () {
homestead --no-ansi | sed "1,/Available commands/d" | awk '/^ +[a-z]+/ { print $1 }'
}
_homestead () {
compadd `_homestead_get_command_list`
}
compdef _homestead homestead
## HTTPie # HTTPie plugin
**Maintainer:** [lululau](https://github.com/lululau)
This plugin adds completion for [HTTPie](https://httpie.org), a command line HTTP
client, a friendlier cURL replacement.
To use it, add `httpie` to the plugins array in your zshrc file:
This plugin adds completion for HTTPie, which is a command line HTTP client, a user-friendly cURL replacement. ```zsh
plugins=(... httpie)
```
[HTTPie Homepage](http://httpie.org) It uses completion from [zsh-completions](https://github.com/zsh-users/zsh-completions).
**Maintainer:** [lululau](https://github.com/lululau)
#compdef http
# ------------------------------------------------------------------------------
# Copyright (c) 2015 Github zsh-users - http://github.com/zsh-users
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of the zsh-users nor the
# names of its contributors may be used to endorse or promote products
# derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# ------------------------------------------------------------------------------
# Description
# -----------
#
# Completion script for httpie 0.7.2 (http://httpie.org)
#
# ------------------------------------------------------------------------------
# Authors
# -------
#
# * Akira Maeda <https://github.com/glidenote>
# * Valodim <https://github.com/Valodim>
# * Claus Klingberg <https://github.com/cjk>
#
# ------------------------------------------------------------------------------
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
# vim: ft=zsh sw=2 ts=2 et
# ------------------------------------------------------------------------------
_httpie_params () {
local ret=1 expl
# or a url
if (( CURRENT <= NORMARG+1 )) && [[ $words[NORMARG] != *:* ]] ; then
_httpie_urls && ret=0
# regular param, if we already have a url
elif (( CURRENT > NORMARG )); then
# if the suffix is precisely : this is shorthand for a header
if [[ -prefix ':' ]]; then
PREFIX=
SUFFIX=:
fi
# if we are in front of a : (possibly due to the PREFIX move before)
if [[ -suffix ':' ]]; then
# this is rather buggy with normal tab behavior :\
compstate[insert]=menu
_wanted http_header expl 'HTTP Header' \
compadd -s ':' -S '' -- Content-Type Cookie && return 0
fi
# ignore all prefix stuff
compset -P '(#b)([^:@=]#)'
local name=$match[1]
if compset -P '='; then
_message "$name data field value"
elif compset -P '@'; then
_files
elif compset -P ':=@'; then
_files
elif compset -P ':='; then
_message "$name raw json data"
elif compset -P '=='; then
_message "$name url parameter value"
elif compset -P ':'; then
_message "$name header content"
else
typeset -a ops
ops=(
'=:data field'
'\::header'
'==:request parameter'
'@:data file field'
'\:=:raw json field'
'\:=@:raw json field file path'
)
_describe -t httpparams "parameter types" ops -Q -S ''
fi
ret=0
fi
# first arg may be a request method
(( CURRENT == NORMARG )) &&
_wanted http_method expl 'Request Method' \
compadd GET POST PUT DELETE HEAD OPTIONS TRACE CONNECT PATCH LINK UNLINK && ret=0
return $ret
}
_httpie_urls() {
local ret=1
if ! [[ -prefix [-+.a-z0-9]#:// ]]; then
local expl
compset -S '[^:/]*' && compstate[to_end]=''
_wanted url-schemas expl 'URL schema' compadd -S '' http:// https:// && ret=0
else
_urls && ret=0
fi
return $ret
}
_httpie_printflags () {
local ret=1
# not sure why this is necessary, but it will complete "-pH" style without it
[[ $IPREFIX == "-p" ]] && IPREFIX+=" "
compset -P '(#b)([a-zA-Z]#)'
local -a flags
[[ $match[1] != *H* ]] && flags+=( "H:request headers" )
[[ $match[1] != *B* ]] && flags+=( "B:request body" )
[[ $match[1] != *h* ]] && flags+=( "h:response headers" )
[[ $match[1] != *b* ]] && flags+=( "b:response body" )
_describe -t printflags "print flags" flags -S '' && ret=0
return $ret
}
integer NORMARG
_arguments -n -C -s \
'(-j --json -f)'{-j,--json}'[Data items from the command line are serialized as a JSON object.]' \
'(-f --form -j)'{-f,--form}'[Data items from the command line are serialized as form fields.]' \
'--pretty=[Controls output processing.]:output format:(all colors format none)' \
'(-s --style)'{-s,--style}'=[Output coloring style]:STYLE:(autumn borland bw colorful default emacs friendly fruity manni monokai murphy native pastie perldoc ttr solarized tango trac vim vs)' \
'(-p --print)'{-p,--print}'=[String specifying what the output should contain]:print flags:_httpie_printflags' \
'(-v --verbose)'{-v,--verbose}'[Print the whole request as well as the response.]' \
'(-p -h --headers)'{-h,--headers}'[Print only the response headers.]' \
'(-p -b --body)'{-b,--body}'[Print only the response body.]' \
'(-S --stream)'{-S,--stream}'[Always stream the output by line, i.e., behave like `tail -f`.]' \
'(-o --output)'{-o,--output}'=[Save output to FILE.]:output file:_files' \
'(-d --download)'{-d,--download}'=[Do not print the response body to stdout.]' \
'(-c --continue)'{-c,--continue}'[Resume an interrupted download.]' \
'(--session-read-only)--session=[Create, or reuse and update a session.]:session name (or path)' \
'(--session)--session-read-only=[Create or read a session without updating it form the request/response exchange.]:session name (or path)' \
'(-a --auth)'{-a,--auth}'=[If only the username is provided (-a username)]:USER\:PASS' \
'--auth-type=[The authentication mechanism to be used. Defaults to "basic".]:AUTH-TYPE:(basic digest)' \
'--proxy=[String mapping protocol to the URL of the proxy.]:PROXY' \
'--follow[Allow full redirects.]' \
"--verify=[Enable or disable verification of ssl certificates.]:verify certificate:(yes no)" \
'--allow-redirects[Set this flag if full redirects are allowed (e.g. re-POST-ing of data at new ``Location``)]' \
'--timeout=[Float describes the timeout of the request (Use socket.setdefaulttimeout() as fallback).]:timeout (seconds)' \
'--check-status[This flag instructs HTTPie to also check the HTTP status code and exit with an error if the status indicates one.]' \
'--ignore-stdin[Do not attempt to read stdin.]' \
'(- *)--help[show help message.]' \
"(- *)--version[show program's version number and exit.]" \
'--traceback[Prints exception traceback should one occur.]' \
'--debug[Prints exception traceback should one occur and other information useful for debugging HTTPie itself.]' \
'*:args:_httpie_params' && return 0
function _httpie_completion() {
_arguments -C \
'(- 1 *)--version[display version information]' \
'(-j|--json)'{-j,--json}'[(default) Data items from the command line are serialized as a JSON object]' \
'(-f|--form)'{-f,--form}'[Data items from the command line are serialized as form fields]' \
'(--pretty)--pretty[<all,colors,format,none> Controls output processing]:options' \
'(-s|--style)'{-s,--style}'[Output coloring style]' \
'(-p|--print)'{-p,--print}'[String specifying what the output should contain: H(request headers), B(request body), h(response headers), b(response body)]' \
'(-v|--verbose)'{-v,--verbose}'[Print the whole request as well as the response. Shortcut for --print=HBbh.]' \
'(-h|--headers)'{-h,--headers}'[Print only the response headers. Shortcut for --print=h]' \
'(-b|--body)'{-b,--body}'[Print only the response body. Shortcut for --print=b]' \
'(-S|--stream)'{-S,--stream}'[Always stream the output by line, i.e., behave like `tail -f'"'"']' \
'(-o|--output)'{-o,--output}'[Save output to FILE]:file:_files' \
'(-d|--download)'{-d,--download}'[Do not print the response body to stdout. Rather, download it and store it in a file. The filename is guessed unless specified with --output filename. This action is similar to the default behaviour of wget.]' \
'(-c|--continue)'{-c,--continue}'[Resume an interrupted download. Note that the --output option needs to be specified as well.]' \
'(--session)--session[Create, or reuse and update a session. Within a session, custom headers, auth credential, as well as any cookies sent by the server persist between requests]:file:_files' \
'(--session-read-only)--session-read-only[Create or read a session without updating it form the request/response exchange]:file:_files' \
'(-a|--auth)'{-a,--auth}'[<USER:PASS> If only the username is provided (-a username), HTTPie will prompt for the password]' \
'(--auth-type)--auth-type[<basic, digest> The authentication mechanism to be used. Defaults to "basic".]' \
'(--proxy)--proxy[<PROTOCOL:PROXY_URL> String mapping protocol to the URL of the proxy]' \
'(--follow)--follow[Set this flag if full redirects are allowed (e.g. re-POST-ing of data at new Location).]' \
'(--verify)--verify[<VERIFY> Set to "no" to skip checking the host'"'"'s SSL certificate. You can also pass the path to a CA_BUNDLE file for private certs. You can also set the REQUESTS_CA_BUNDLE environment variable. Defaults to "yes".]' \
'(--timeout)--timeout[<SECONDS> The connection timeout of the request in seconds. The default value is 30 seconds]' \
'(--check-status)--check-status[By default, HTTPie exits with 0 when no network or other fatal errors occur. This flag instructs HTTPie to also check the HTTP status code and exit with an error if the status indicates one.]' \
'(--ignore-stdin)--ignore-stdin[Do not attempt to read stdin]' \
'(--help)--help[Show this help message and exit]' \
'(--traceback)--traceback[Prints exception traceback should one occur]' \
'(--debug)--debug[Prints exception traceback should one occur, and also other information that is useful for debugging HTTPie itself and for reporting bugs]' \
'1: :->cmds' \
'*: :->args' && ret=0
}
compdef _httpie_completion http
\ No newline at end of file
# iTerm2 plugin
This plugin adds a few functions that are useful when using [iTerm2](https://www.iterm2.com/).
To use it, add _iterm2_ to the plugins array of your zshrc file:
```
plugins=(... iterm2)
```
## Plugin commands
* `_iterm2_command <iterm2-command>`
executes an arbitrary iTerm2 command via an escape code sequence.
See https://iterm2.com/documentation-escape-codes.html for all supported commands.
* `iterm2_profile <profile-name>`
changes the current terminal window's profile (colors, fonts, settings, etc).
`profile-name` is the name of another iTerm2 profile. The profile name can contain spaces.
* `iterm2_tab_color <red> <green> <blue>`
changes the color of iTerm2's currently active tab.
`red`/`green`/`blue` are on the range 0-255.
* `iterm2_tab_color_reset`
resets the color of iTerm2's current tab back to default.
## Contributors
- [Aviv Rosenberg](https://github.com/avivrosenberg)
# provide a whois command with a more accurate and up to date list of whois
# servers using CNAMES via whois.geek.nz
function iwhois() {
resolver="whois.geek.nz"
tld=`echo ${@: -1} | awk -F "." '{print $NF}'`
whois -h ${tld}.${resolver} "$@" ;
}
# Jake
This plugin provides completion for [Jake](http://jakejs.com/).
To use it add jake-node to the plugins array in your zshrc file.
```bash
plugins=(... jake-node)
```
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment