Unverified Commit 8c95c523 authored by Kozlov Alexander's avatar Kozlov Alexander Committed by GitHub
Browse files

Merge branch 'master' into master

parents dd30cf10 3d8f2bda
# 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)
```
# 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
...@@ -3,4 +3,4 @@ ...@@ -3,4 +3,4 @@
This plugin adds completion for HTTPie, which is a command line HTTP client, a user-friendly cURL replacement. This plugin adds completion for HTTPie, which is a command line HTTP client, a user-friendly cURL replacement.
[HTTPie Homepage](http://httpie.org) [HTTPie Homepage](https://httpie.org)
# 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)
# iwhois
Provides a whois command with a more accurate and up-to-date list of whois servers
using CNAMES, via [whois.geek.nz](https://github.com/iwantmyname/whois.geek.nz).
To use it, add iwhois to the plugins array of your zshrc file:
```
plugins=(... iwhois)
```
### Usage
The plugin defines the function `iwhois` that takes a domain name as an argument:
```
$ iwhois github.com
Domain Name: GITHUB.COM
Registry Domain ID: 1264983250_DOMAIN_COM-VRSN
Registrar WHOIS Server: whois.markmonitor.com
Registrar URL: http://www.markmonitor.com
Updated Date: 2017-06-26T16:02:39Z
Creation Date: 2007-10-09T18:20:50Z
...
```
# provide a whois command with a more accurate and up to date list of whois
# servers using CNAMES via whois.geek.nz
function iwhois() { function iwhois() {
resolver="whois.geek.nz" resolver="whois.geek.nz"
tld=`echo ${@: -1} | awk -F "." '{print $NF}'` tld=`echo ${@: -1} | awk -F "." '{print $NF}'`
......
# 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)
```
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
# Warning : Jakefile should have the right case : Jakefile or jakefile # Warning : Jakefile should have the right case : Jakefile or jakefile
# Tested on : MacOSX 10.7 (Lion), Ubuntu 11.10 # Tested on : MacOSX 10.7 (Lion), Ubuntu 11.10
# Author : Alexandre Lacheze (@al3xstrat) # Author : Alexandre Lacheze (@al3xstrat)
# Inspiration : http://weblog.rubyonrails.org/2006/3/9/fast-rake-task-completion-for-zsh # Inspiration : https://weblog.rubyonrails.org/2006/3/9/fast-rake-task-completion-for-zsh
function _jake () { function _jake () {
if [ -f Jakefile ]||[ -f jakefile ]; then if [ -f Jakefile ]||[ -f jakefile ]; then
......
# jenv plugin
[jenv](https://www.jenv.be/) is a Java version manager similiar to [rbenv](https://github.com/rbenv/rbenv)
and [pyenv](https://github.com/yyuu/pyenv).
This plugin initializes jenv and provides the `jenv_prompt_info` function to add Java
version information to prompts.
To use, add `jenv` to your plugins array in your zshrc file:
```zsh
plugins=(... jenv)
```
## Theme example
You can modify your `$PROMPT` or `$RPROMPT` variables to run `jenv_prompt_info`.
For example:
```
PROMPT="%~$ "
RPROMPT='$(jenv_prompt_info)'
```
changes your prompt to:
```
~/java/project$ ▋ oracle64-1.6.0.39
```
jenvdirs=("$HOME/.jenv" "/usr/local/jenv" "/opt/jenv")
FOUND_JENV=0
for jenvdir in $jenvdirs; do
if [[ -d "${jenvdir}/bin" ]]; then
FOUND_JENV=1
break
fi
done
if [[ $FOUND_JENV -eq 0 ]]; then
if (( $+commands[brew] )) && jenvdir="$(brew --prefix jenv)"; then
[[ -d "${jenvdir}/bin" ]] && FOUND_JENV=1
fi
fi
if [[ $FOUND_JENV -eq 1 ]]; then
export PATH="${jenvdir}/bin:$PATH"
eval "$(jenv init - zsh)"
function jenv_prompt_info() { jenv version-name 2>/dev/null }
if [[ -d "${jenvdir}/versions" ]]; then
export JENV_ROOT=$jenvdir
fi
else
function jenv_prompt_info() { echo "system: $(java -version 2>&1 | cut -f 2 -d ' ')" }
fi
unset jenvdir jenvdirs FOUND_JENV
...@@ -21,6 +21,7 @@ jira new # opens a new issue ...@@ -21,6 +21,7 @@ jira new # opens a new issue
jira dashboard # opens your JIRA dashboard jira dashboard # opens your JIRA dashboard
jira reported [username] # queries for issues reported by a user jira reported [username] # queries for issues reported by a user
jira assigned [username] # queries for issues assigned to a user jira assigned [username] # queries for issues assigned to a user
jira branch # opens an existing issue matching the current branch name
jira ABC-123 # opens an existing issue jira ABC-123 # opens an existing issue
jira ABC-123 m # opens an existing issue for adding a comment jira ABC-123 m # opens an existing issue for adding a comment
``` ```
......
...@@ -7,7 +7,7 @@ _1st_arguments=( ...@@ -7,7 +7,7 @@ _1st_arguments=(
'dashboard:open the dashboard' 'dashboard:open the dashboard'
'reported:search for issues reported by a user' 'reported:search for issues reported by a user'
'assigned:search for issues assigned to a user' 'assigned:search for issues assigned to a user'
'br:open the issue named after the git branch of the current directory' 'branch:open the issue named after the git branch of the current directory'
'dumpconfig:display effective jira configuration' 'dumpconfig:display effective jira configuration'
) )
......
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