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

Merge branch 'master' into fabric_task_description

parents 225425fe 40df67bc
# Lighthouse plugin
This plugin adds commands to manage [Lighthouse](https://lighthouseapp.com/).
To use it, add `lighthouse` to the plugins array in your zshrc file:
```zsh
plugins=(... lighthouse)
```
## Commands
* `open_lighthouse_ticket <issue>` (alias: `lho`):
Opens the URL to the issue passed as an argument. To use it, add a `.lighthouse-url`
file in your directory with the URL to the individual project.
Example:
```zsh
$ cat .lighthouse-url
https://rails.lighthouseapp.com/projects/8994
$ lho 23
Opening ticket #23
# The browser goes to https://rails.lighthouseapp.com/projects/8994/tickets/23
```
# To use: add a .lighthouse file into your directory with the URL to the
# individual project. For example:
# https://rails.lighthouseapp.com/projects/8994
# Example usage: http://screencast.com/t/ZDgwNDUwNT
open_lighthouse_ticket () {
if [ ! -f .lighthouse-url ]; then
echo "There is no .lighthouse-url file in the current directory..."
return 0;
else
lighthouse_url=$(cat .lighthouse-url);
echo "Opening ticket #$1";
open_command "$lighthouse_url/tickets/$1";
return 0
fi
lighthouse_url=$(cat .lighthouse-url)
echo "Opening ticket #$1"
open_command "$lighthouse_url/tickets/$1"
}
alias lho='open_lighthouse_ticket'
# lol
Plugin for adding catspeak aliases, because why not
## Enabling the plugin
1. Open your `.zshrc` file and add `lol` in the plugins section:
```zsh
plugins=(
# all your enabled plugins
lol
)
```
2. Reload the source file or restart your Terminal session:
```console
$ source ~/.zshrc
$
```
## Aliases
| Alias | Command |
| ------------ | ---------------------------------------------------------------- |
| `:3` | `echo` |
| `alwayz` | `tail -f` |
| `bringz` | `git pull` |
| `btw` | `nice` |
| `byes` | `exit` |
| `chicken` | `git add` |
| `cya` | `reboot` |
| `donotwant` | `rm` |
| `dowant` | `cp` |
| `gimmeh` | `touch` |
| `gtfo` | `mv` |
| `hackzor` | `git init` |
| `hai` | `cd` |
| `icanhas` | `mkdir` |
| `ihasbucket` | `df -h` |
| `iminurbase` | `finger` |
| `inur` | `locate` |
| `invisible` | `cat` |
| `iz` | `ls` |
| `kthxbai` | `halt` |
| `letcat` | `git checkout` |
| `moar` | `more` |
| `nomnom` | `killall` |
| `nomz` | `ps aux` |
| `nowai` | `chmod` |
| `oanward` | `git commit -m` |
| `obtw` | `nohup` |
| `onoz` | `cat /var/log/errors.log` |
| `ooanward` | `git commit -am` |
| `plz` | `pwd` |
| `pwned` | `ssh` |
| `rtfm` | `man` |
| `rulz` | `git push` |
| `tldr` | `less` |
| `violenz` | `git rebase` |
| `visible` | `echo` |
| `wtf` | `dmesg` |
| `yolo` | `git commit -m "$(curl -s https://whatthecommit.com/index.txt)"` |
## Usage Examples
```sh
# mkdir new-directory
icanhas new-directory
# killall firefox
nomnom firefox
# chmod u=r,go= some.file
nowai u=r,go= some.file
# ssh root@catserver.org
pwned root@catserver.org
# git commit -m "$(curl -s https://whatthecommit.com/index.txt)"
yolo
```
# LOL!!1
# Source: http://aur.archlinux.org/packages/lolbash/lolbash/lolbash.sh
# Source: https://aur.archlinux.org/packages/lolbash/lolbash/lolbash.sh
alias wtf='dmesg'
alias onoz='cat /var/log/errors.log'
......@@ -45,6 +45,7 @@ alias bringz='git pull'
alias chicken='git add'
alias oanward='git commit -m'
alias ooanward='git commit -am'
alias yolo='git commit -m "$(curl -s https://whatthecommit.com/index.txt)"'
alias letcat='git checkout'
alias violenz='git rebase'
# Macports plugin
This plugin adds completion for the package manager [Macports](https://macports.com/),
as well as some aliases for common Macports commands.
To use it, add `macports` to the plugins array in your zshrc file:
```zsh
plugins=(... macports)
```
## Aliases
| Alias | Command | Description |
|-------|------------------------------------|--------------------------------------------------------------|
| pc | `sudo port clean --all installed` | Clean up intermediate installation files for installed ports |
| pi | `sudo port install` | Install package given as argument |
| psu | `sudo port selfupdate` | Update ports tree with MacPorts repository |
| puni | `sudo port uninstall inactive` | Uninstall inactive ports |
| puo | `sudo port upgrade outdated` | Upgrade ports with newer versions available |
| pup | `psu && puo` | Update ports tree, then upgrade ports to newest versions |
#Aliases
alias pc="sudo port clean --all installed"
alias pi="sudo port install $1"
alias pi="sudo port install"
alias psu="sudo port selfupdate"
alias puni="sudo port uninstall inactive"
alias puo="sudo port upgrade outdated"
alias pup="psu && puo"
## Magic Enter plugin
This plugin makes your enter key magical, by binding commonly used commands to it.
To use it, add `magic-enter` to the plugins array in your zshrc file. You can set the
commands to be run in your .zshrc, before the line containing plugins. If no command
is specified in a git directory, `git status` is executed; in other directories, `ls`.
```zsh
# defaults
MAGIC_ENTER_GIT_COMMAND='git status -u .'
MAGIC_ENTER_OTHER_COMMAND='ls -lh .'
plugins=(... magic-enter)
```
**Maintainer:** [@dufferzafar](https://github.com/dufferzafar)
# Bind quick stuff to enter!
#
# Pressing enter in a git directory runs `git status`
# in other directories `ls`
magic-enter () {
# If commands are not already set, use the defaults
[ -z "$MAGIC_ENTER_GIT_COMMAND" ] && MAGIC_ENTER_GIT_COMMAND="git status -u ."
[ -z "$MAGIC_ENTER_OTHER_COMMAND" ] && MAGIC_ENTER_OTHER_COMMAND="ls -lh ."
if [[ -z $BUFFER ]]; then
echo ""
if git rev-parse --is-inside-work-tree &>/dev/null; then
eval "$MAGIC_ENTER_GIT_COMMAND"
else
eval "$MAGIC_ENTER_OTHER_COMMAND"
fi
zle redisplay
else
zle accept-line
fi
}
zle -N magic-enter
bindkey "^M" magic-enter
# Man plugin
This plugin adds a shortcut to insert man before the previous command.
To use it, add `man` to the plugins array in your zshrc file:
```zsh
plugins=(... man)
```
# Keyboard Shortcuts
| Shortcut | Description |
|-----------------------------------|------------------------------------------------------------------------|
| <kbd>Esc</kbd> + man | add man before the previous command to see the manual for this command |
......@@ -5,7 +5,7 @@
# * Jerry Ling<jerryling315@gmail.com>
#
# ------------------------------------------------------------------------------
# Usgae
# Usage
# -----
#
# man will be inserted before the command
......@@ -24,4 +24,4 @@ bindkey "\e"man man-command-line
# ------------------------------------------------------------------------------
# Also, you might want to use man-preview included in 'osx' plugin
# just substitute "man" in the function with "man-preview" after you included OS X in
# the .zshrc
\ No newline at end of file
# the .zshrc
# Mercurial
alias hga='hg add'
alias hgc='hg commit'
alias hgb='hg branch'
alias hgba='hg branches'
......
......@@ -13,19 +13,38 @@ _meteor_installed_packages() {
local -a _1st_arguments
_1st_arguments=(
'run:[Default] Run this project in local development mode'
'create:Create a new project'
'update:Upgrade this project to the latest version of Meteor'
'add:Add a package to this project'
'remove:Remove a package from this project'
'list:List available packages'
'help:Display Meteor help'
'bundle:Pack this project up into a tarball'
'mongo:Connect to the Mongo database for the specified site'
'deploy:Deploy this project to Meteor'
'logs:Show logs for specified site'
'reset:Reset the project state. Erases the local database.'
'test-packages:Test one or more packages'
"add-platform:Add a platform to this project."
"add:Add a package to this project."
"admin:Administrative commands."
"authorized:View or change authorized users and organizations for a site."
"build:Build this project for all platforms."
"claim:Claim a site deployed with an old Meteor version."
"configure-android:Run the Android configuration tool from Meteor's ADK environment."
"create:Create a new project."
"debug:Run the project, but suspend the server process for debugging."
"deploy:Deploy this project to Meteor."
"install-sdk:Installs SDKs for a platform."
"lint:Build this project and run the linters printing all errors and warnings."
"list-platforms:List the platforms added to your project."
"list-sites:List sites for which you are authorized."
"list:List the packages explicitly used by your project."
"login:Log in to your Meteor developer account."
"logout:Log out of your Meteor developer account."
"logs:Show logs for specified site."
"mongo:Connect to the Mongo database for the specified site."
"publish-for-arch:Builds an already-published package for a new platform."
"publish-release:Publish a new meteor release to the package server."
"publish:Publish a new version of a package to the package server."
"remove-platform:Remove a platform from this project."
"remove:Remove a package from this project."
"reset:Reset the project state. Erases the local database."
"run:[default] Run this project in local development mode."
"search:Search through the package server database."
"shell:Launch a Node REPL for interactively evaluating server-side code."
"show:Show detailed information about a release or package."
"test-packages:Test one or more packages."
"update:Upgrade this project's dependencies to their latest versions."
"whoami:Prints the username of your Meteor developer account."
)
local expl
......@@ -45,4 +64,4 @@ case "$words[2]" in
add)
_meteor_all_packages
_wanted packages expl 'all packages' compadd -a packages ;;
esac
\ No newline at end of file
esac
# minikube
This plugin provides completion for [minikube](https://github.com/kubernetes/minikube).
To use it, add `minikube` to the plugins array in your zshrc file.
```
plugins=(... minikube)
```
# Autocompletion for Minikube.
#
if [ $commands[minikube] ]; then
source <(minikube completion zsh)
fi
......@@ -8,7 +8,7 @@ to update cache you should remove .mix_tasks file
Inspired by and based on rake-fast zsh plugin.
This is entirely based on [this pull request by Ullrich Schäfer](https://github.com/robb/.dotfiles/pull/10/), which is inspired by [this Ruby on Rails trick from 2006](http://weblog.rubyonrails.org/2006/3/9/fast-mix-task-completion-for-zsh/).
This is entirely based on [this pull request by Ullrich Schäfer](https://github.com/robb/.dotfiles/pull/10/), which is inspired by [this Ruby on Rails trick from 2006](https://weblog.rubyonrails.org/2006/3/9/fast-rake-task-completion-for-zsh/).
## Installation
......@@ -25,4 +25,4 @@ You might consider adding `.mix_tasks` to your [global .gitignore](https://help.
`mix`, then press tab
Currently maintained by [styx](https://github.com/styx/)
\ No newline at end of file
Currently maintained by [styx](https://github.com/styx/)
......@@ -12,7 +12,7 @@ _mix_does_task_list_need_generating () {
}
_mix_generate () {
mix --help | grep -v 'iex -S' | tail -n +2 | cut -d " " -f 2 > .mix_tasks
mix help | grep -v 'iex -S' | tail -n +2 | cut -d " " -f 2 > .mix_tasks
}
_mix () {
......
# Mix plugin
This plugin adds completions for the [Elixir's Mix build tool](https://hexdocs.pm/mix/Mix.html).
To use it, add `mix` to the plugins array in your zshrc file:
```zsh
plugins=(... mix)
```
## Supported Task Types
| Task Type | Documentation |
|-------------------------|----------------------------------------------------------|
| Elixir | [Elixir Lang](https://elixir-lang.org/) |
| Phoenix v1.2.1 and below| [Phoenix](https://hexdocs.pm/phoenix/1.2.1/Phoenix.html) |
| Phoenix v1.3.0 and above| [Phoenix](https://hexdocs.pm/phoenix/Phoenix.html) |
| Ecto | [Ecto](https://hexdocs.pm/ecto/Ecto.html) |
| Hex | [Hex](https://hex.pm/) |
| Nerves | [Nerves](https://nerves-project.org/) |
......@@ -21,7 +21,19 @@ _1st_arguments=(
'deps.unlock:Unlock the given dependencies'
'deps.update:Update the given dependencies'
'do:Executes the tasks separated by comma'
'ecto.create:Create Ecto database'
'ecto.drop:Drop the storage for the given repository'
'ecto.dump:Dumps the current environment’s database structure'
'ecto.gen.migration:Generates a migration'
'ecto.gen.repo:Generates a new repository'
'ecto.load:Loads the current environment’s database structure'
'ecto.migrate:Runs Ecto migration'
'ecto.migrations:Displays the up / down migration status'
'ecto.rollback:Reverts applied migrations'
'escript.build:Builds an escript for the project'
'firmware:Nerves - Build a firmware image for the selected target platform'
'firmware.burn:Nerves - Writes the generated firmware image to an attached SDCard or file'
'firmware.image:Nerves - Create a firmware image file that can be copied byte-for-byte'
'help:Print help information for tasks'
'hex:Print hex help information'
'hex.config:Read or update hex config'
......@@ -36,7 +48,14 @@ _1st_arguments=(
'loadconfig:Loads and persists the given configuration'
'local:List local tasks'
'local.hex:Install hex locally'
'local.phoenix:Updates Phoenix locally'
'local.phx:Updates the Phoenix project generator locally'
'local.rebar:Install rebar locally'
'nerves.artifact:Create an artifact for a specified Nerves package'
'nerves.artifact.get:Nerves get artifacts'
'nerves.info:Prints Nerves system information'
'nerves.new:Create a new Nerves application'
'nerves.release.init:Prepare a new Nerves project for use with releases'
'new:Create a new Elixir project'
'phoenix.digest:Digests and compress static files'
'phoenix.gen.channel:Generates a Phoenix channel'
......@@ -44,9 +63,24 @@ _1st_arguments=(
'phoenix.gen.json:Generates a controller and model for a JSON based resource'
'phoenix.gen.model:Generates an Ecto model'
'phoenix.gen.secret:Generates a secret'
'phoenix.new:Create a new Phoenix application'
'phoenix.new:Creates a new Phoenix v1.2.1 application'
'phoenix.routes:Prints all routes'
'phoenix.server:Starts applications and their servers'
'phx.digest:Digests and compresses static files'
'phx.digest.clean:Removes old versions of static assets.'
'phx.gen.channel:Generates a Phoenix channel'
'phx.gen.context:Generates a context with functions around an Ecto schema'
'phx.gen.embedded:Generates an embedded Ecto schema file'
'phx.gen.html:Generates controller, views, and context for an HTML resource'
'phx.gen.json:Generates controller, views, and context for a JSON resource'
'phx.gen.presence:Generates a Presence tracker'
'phx.gen.schema:Generates an Ecto schema and migration file'
'phx.gen.secret:Generates a secret'
'phx.new:Creates a new Phoenix v1.3.0 application'
'phx.new.ecto:Creates a new Ecto project within an umbrella project'
'phx.new.web:Creates a new Phoenix web project within an umbrella project'
'phx.routes:Prints all routes'
'phx.server:Starts applications and their servers'
'run:Run the given file or expression'
"test:Run a project's tests"
'--help:Describe available tasks'
......@@ -58,7 +92,7 @@ __task_list ()
local expl
declare -a tasks
tasks=(app.start archive archive.build archive.install archive.uninstall clean cmd compile compile.protocols deps deps.clean deps.compile deps.get deps.unlock deps.update do escript.build help hex hex.config hex.docs hex.info hex.key hex.outdated hex.owner hex.publish hex.search hex.user loadconfig local local.hex local.rebar new phoenix.digest phoenix.gen.channel phoenix.gen.html phoenix.gen.json phoenix.gen.model phoenix.gen.secret phoenix.new phoenix.routes phoenix.server run test)
tasks=(app.start archive archive.build archive.install archive.uninstall clean cmd compile compile.protocols deps deps.clean deps.compile deps.get deps.unlock deps.update do escript.build help hex hex.config hex.docs hex.info hex.key hex.outdated hex.owner hex.publish hex.search hex.user loadconfig local local.hex local.rebar new phoenix.digest phoenix.gen.channel phoenix.gen.html phoenix.gen.json phoenix.gen.model phoenix.gen.secret phoenix.new phoenix.routes phoenix.server phx.digest phx.digest.clean phx.gen.channel phx.gen.context phx.gen.embedded phx.gen.html phx.gen.json phx.gen.presence phx.gen.schema phx.gen.secret phx.new phx.new.ecto phx.new.web phx.routes phx.server run test)
_wanted tasks expl 'help' compadd $tasks
}
......@@ -86,6 +120,9 @@ case $state in
(test)
_files
;;
(run)
_files
;;
esac
;;
esac
# Mosh Plugin
This plugin allows SSH tab completion for [mosh](https://mosh.org/) hostnames.
To use it, add `mosh` to the plugins array in your zshrc file:
```
plugins=(... mosh)
```
## Introduction
# mvn plugin
The [mvn plugin](https://github.com/robbyrussell/oh-my-zsh/tree/master/plugins/mvn) provides many
[useful aliases](#aliases) as well as completion for the `mvn` command.
The mvn plugin provides many [useful aliases](#aliases) as well as completion for
the [Apache Maven](https://maven.apache.org/) command (`mvn`).
Enable it by adding `mvn` to the plugins array in your zshrc file:
```zsh
......@@ -10,24 +10,49 @@ plugins=(... mvn)
## Aliases
The plugin aliases mvn to a function that calls `mvnw` (the [Maven Wrapper](https://github.com/takari/maven-wrapper))
if it's found, or the mvn command otherwise.
| Alias | Command |
|:---------------------|:------------------------------------------------|
| `mvncie` | `mvn clean install eclipse:eclipse` |
| `mvn!` | `mvn -f <root>/pom.xml` |
| `mvnag` | `mvn archetype:generate` |
| `mvnboot` | `mvn spring-boot:run` |
| `mvnc` | `mvn clean` |
| `mvncd` | `mvn clean deploy` |
| `mvnce` | `mvn clean eclipse:clean eclipse:eclipse` |
| `mvnci` | `mvn clean install` |
| `mvncie` | `mvn clean install eclipse:eclipse` |
| `mvncini` | `mvn clean initialize` |
| `mvncist` | `mvn clean install -DskipTests` |
| `mvncisto` | `mvn clean install -DskipTests --offline` |
| `mvne` | `mvn eclipse:eclipse` |
| `mvnd` | `mvn deploy` |
| `mvnp` | `mvn package` |
| `mvnc` | `mvn clean` |
| `mvncom` | `mvn compile` |
| `mvncp` | `mvn clean package` |
| `mvnct` | `mvn clean test` |
| `mvnt` | `mvn test` |
| `mvnag` | `mvn archetype:generate` |
| `mvn-updates` | `mvn versions:display-dependency-updates` |
| `mvntc7` | `mvn tomcat7:run` |
| `mvnjetty` | `mvn jetty:run` |
| `mvncv` | `mvn clean verify` |
| `mvncvst` | `mvn clean verify -DskipTests` |
| `mvnd` | `mvn deploy` |
| `mvndocs` | `mvn dependency:resolve -Dclassifier=javadoc` |
| `mvndt` | `mvn dependency:tree` |
| `mvne` | `mvn eclipse:eclipse` |
| `mvnjetty` | `mvn jetty:run` |
| `mvnp` | `mvn package` |
| `mvns` | `mvn site` |
| `mvnsrc` | `mvn dependency:sources` |
| `mvndocs` | `mvn dependency:resolve -Dclassifier=javadoc` |
| `mvnt` | `mvn test` |
| `mvntc` | `mvn tomcat:run` |
| `mvntc7` | `mvn tomcat7:run` |
| `mvn-updates` | `mvn versions:display-dependency-updates` |
## mvn-color
It's a function that wraps the mvn command to colorize it's output. You can use it in place
of the `mvn` command. For example: instead of `mvn test`, use `mvn-color test`.
Since [Maven 3.5.0](https://maven.apache.org/docs/3.5.0/release-notes.html) the mvn command
has colored output, so this function will be soon removed from the plugin.
### Known bugs
It has a bug where it will swallow mvn prompts for user input, _e.g._ when using
`archetype:generate`. See [#5052](https://github.com/robbyrussell/oh-my-zsh/issues/5052).
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