Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
* 'master' of https://github.com/robbyrussell/oh-my-zsh: (28 commits)
  Added: Helm plugins (ohmyzsh#6265)
  plugin: npx (ohmyzsh#6152)
  Set RBENV_ROOT to "$HOME/.rbenv" if not already set (ohmyzsh#6324)
  Change `agud` alias from `dist-upgrade` to `full-upgrade` (ohmyzsh#6384)
  fix conflict with command ag (ohmyzsh#6395)
  Update Yarn plugin alias (ohmyzsh#6246)
  Improved npm aliases: run, publish (ohmyzsh#6354)
  Enhanced Laravel 5 Plugin (ohmyzsh#6376)
  Check first for bin/stubs directory in _rails_command and _rake_command (ohmyzsh#6372)
  README.md: ZSH_THEM_RANDOM.. > ZSH_THEME_RANDOM.. (ohmyzsh#6390)
  jira plugin: take into account action argument (fix ohmyzsh#6388) (ohmyzsh#6393)
  Added 'clean verify' to the mvn plugin targets (ohmyzsh#6339)
  Use HTTPS for Planet Argon links (ohmyzsh#6326)
  README.md: shit load -> shit-load (ohmyzsh#6344)
  Update git-flow aliases (ohmyzsh#6335)
  Allow jira default action file based setting (ohmyzsh#6367)
  Add nixos support for autojump plugin (ohmyzsh#6365)
  Add shortcut for opening current branch in Jira (ohmyzsh#6366)
  Update rust plugin for latest rustc (ohmyzsh#6342)
  [wd] Update wd plugin to latest version (ohmyzsh#6371)
  ...
  • Loading branch information
Gerardo Curiel committed Nov 6, 2017
2 parents bf582ca + 9edb3fc commit a6b63fb
Show file tree
Hide file tree
Showing 31 changed files with 398 additions and 112 deletions.
17 changes: 13 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ sh -c "$(wget https://raw.githubusercontent.com/gerardo/oh-my-zsh/master/tools/i

### Plugins

Oh My Zsh comes with a shit load of plugins to take advantage of. You can take a look in the [plugins](https://github.com/robbyrussell/oh-my-zsh/tree/master/plugins) directory and/or the [wiki](https://github.com/robbyrussell/oh-my-zsh/wiki/Plugins) to see what's currently available.
Oh My Zsh comes with a shitload of plugins to take advantage of. You can take a look in the [plugins](https://github.com/robbyrussell/oh-my-zsh/tree/master/plugins) directory and/or the [wiki](https://github.com/robbyrussell/oh-my-zsh/wiki/Plugins) to see what's currently available.

#### Enabling Plugins

Expand Down Expand Up @@ -79,10 +79,11 @@ To use a different theme, simply change the value to match the name of your desi

```shell
ZSH_THEME="agnoster" # (this is one of the fancy ones)
# you might need to install a special Powerline font on your console's host for this to work
# see https://github.com/robbyrussell/oh-my-zsh/wiki/Themes#agnoster
```

_Note: many themes require installing the [Powerline Fonts](https://github.com/powerline/fonts) in order to render properly._

Open up a new terminal window and your prompt should look something like this:

![Agnoster theme](https://cloud.githubusercontent.com/assets/2618447/6316862/70f58fb6-ba03-11e4-82c9-c083bf9a6574.png)
Expand All @@ -96,6 +97,14 @@ If you're feeling feisty, you can let the computer select one randomly for you e
ZSH_THEME="random" # (...please let it be pie... please be some pie..)
```

And if you want to pick random theme from a list of your favorite themes:

```shell
ZSH_THEME_RANDOM_CANDIDATES=(
"robbyrussell"
"agnoster"
)
```

## Advanced Topics

Expand Down Expand Up @@ -217,14 +226,14 @@ We're on the social media.

## Merchandise

We have [stickers](http://shop.planetargon.com/products/ohmyzsh-stickers-set-of-3-stickers) and [shirts](http://shop.planetargon.com/products/ohmyzsh-t-shirts) for you to show off your love of Oh My Zsh. Again, this will help you become the talk of the town!
We have [stickers](https://shop.planetargon.com/products/ohmyzsh-stickers-set-of-3-stickers) and [shirts](http://shop.planetargon.com/products/ohmyzsh-t-shirts) for you to show off your love of Oh My Zsh. Again, this will help you become the talk of the town!

## License

Oh My Zsh is released under the [MIT license](LICENSE.txt).

## About Planet Argon

![Planet Argon](http://pa-github-assets.s3.amazonaws.com/PARGON_logo_digital_COL-small.jpg)
![Planet Argon](https://pa-github-assets.s3.amazonaws.com/PARGON_logo_digital_COL-small.jpg)

Oh My Zsh was started by the team at [Planet Argon](https://www.planetargon.com/?utm_source=github), a [Ruby on Rails development agency](https://www.planetargon.com/skills/ruby-on-rails-development?utm_source=github).
8 changes: 6 additions & 2 deletions oh-my-zsh.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,12 @@ done
unset config_file

# Load the theme
if [ "$ZSH_THEME" = "random" ]; then
themes=($ZSH/themes/*zsh-theme)
if [[ "$ZSH_THEME" == "random" ]]; then
if [[ "${(t)ZSH_THEME_RANDOM_CANDIDATES}" = "array" ]] && [[ "${#ZSH_THEME_RANDOM_CANDIDATES[@]}" -gt 0 ]]; then
themes=($ZSH/themes/${^ZSH_THEME_RANDOM_CANDIDATES}.zsh-theme)
else
themes=($ZSH/themes/*zsh-theme)
fi
N=${#themes[@]}
((N=(RANDOM%N)+1))
RANDOM_THEME=${themes[$N]}
Expand Down
2 changes: 2 additions & 0 deletions plugins/autojump/autojump.plugin.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ if [ $commands[autojump] ]; then # check if autojump is installed
. $HOME/.autojump/share/autojump/autojump.zsh
elif [ -f $HOME/.nix-profile/etc/profile.d/autojump.zsh ]; then # nix installation
. $HOME/.nix-profile/etc/profile.d/autojump.zsh
elif [ -f /run/current-system/sw/share/autojump/autojump.zsh ]; then # nixos installation
. /run/current-system/sw/share/autojump/autojump.zsh
elif [ -f /usr/share/autojump/autojump.zsh ]; then # debian and ubuntu package
. /usr/share/autojump/autojump.zsh
elif [ -f /etc/profile.d/autojump.zsh ]; then # manual installation
Expand Down
5 changes: 4 additions & 1 deletion plugins/cargo/_cargo
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,13 @@ _cargo() {

_arguments \
'(- 1 *)'{-h,--help}'[show help message]' \
'(- 1 *)'{-V,--version}'[show version information]' \
'(- 1 *)'--list'[list installed commands]' \
'(- 1 *)'--explain'[Run `rustc --explain CODE`]' \
'(- 1 *)'{-v,--verbose}'[use verbose output]' \
'(- 1 *)'--color'[colorization option]' \
'(- 1 *)'{-V,--version}'[show version information]' \
'(- 1 *)'--frozen'[Require Cargo.lock and cache are up to date]' \
'(- 1 *)'--locked'[Require Cargo.lock is up to date]' \
'1: :_cargo_cmds' \
'*:: :->args'

Expand Down
2 changes: 1 addition & 1 deletion plugins/debian/debian.plugin.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ if [[ $use_sudo -eq 1 ]]; then
alias adg='sudo $apt_pref update && sudo $apt_pref $apt_upgr'
alias adu='sudo $apt_pref update && sudo $apt_pref dist-upgrade'
alias afu='sudo apt-file update'
alias ag='sudo $apt_pref $apt_upgr'
alias au='sudo $apt_pref $apt_upgr'
alias ai='sudo $apt_pref install'
# Install all packages given on the command line while using only the first word of each line:
# acs ... | ail
Expand Down
4 changes: 4 additions & 0 deletions plugins/git-flow/git-flow.plugin.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ alias gflrs='git flow release start'
alias gflff='git flow feature finish'
alias gflhf='git flow hotfix finish'
alias gflrf='git flow release finish'
alias gflfp='git flow feature publish'
alias gflhp='git flow hotfix publish'
alias gflrp='git flow release publish'
alias gflfpll='git flow feature pull'

_git-flow ()
{
Expand Down
1 change: 1 addition & 0 deletions plugins/git/git.plugin.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ alias gcs='git commit -S'

alias gd='git diff'
alias gdca='git diff --cached'
alias gdcw='git diff --cached --word-diff'
alias gdct='git describe --tags `git rev-list --tags --max-count=1`'
alias gdt='git diff-tree --no-commit-id --name-only -r'
alias gdw='git diff --word-diff'
Expand Down
7 changes: 7 additions & 0 deletions plugins/helm/helm.plugin.zsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Autocompletion for helm.
#
# Copy from kubectl : https://github.com/pstadler

if [ $commands[helm] ]; then
source <(helm completion zsh)
fi
1 change: 1 addition & 0 deletions plugins/jira/_jira
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ _1st_arguments=(
'dashboard:open the dashboard'
'reported:search for issues reported by a user'
'assigned:search for issues assigned to a user'
'br:open the issue named after the git branch of the current directory'
'dumpconfig:display effective jira configuration'
)

Expand Down
26 changes: 20 additions & 6 deletions plugins/jira/jira.plugin.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,21 @@
#
# See README.md for details

: ${JIRA_DEFAULT_ACTION:=new}

function jira() {
emulate -L zsh
local action=${1:=$JIRA_DEFAULT_ACTION}
local action jira_url jira_prefix
if [[ -n "$1" ]]; then
action=$1
elif [[ -f .jira-default-action ]]; then
action=$(cat .jira-default-action)
elif [[ -f ~/.jira-default-action ]]; then
action=$(cat ~/.jira-default-action)
elif [[ -n "${JIRA_DEFAULT_ACTION}" ]]; then
action=${JIRA_DEFAULT_ACTION}
else
action="new"
fi

local jira_url jira_prefix
if [[ -f .jira-url ]]; then
jira_url=$(cat .jira-url)
elif [[ -f ~/.jira-url ]]; then
Expand Down Expand Up @@ -51,8 +59,14 @@ function jira() {
echo "JIRA_DEFAULT_ACTION=$JIRA_DEFAULT_ACTION"
else
# Anything that doesn't match a special action is considered an issue name
local issue_arg=$action
local issue="${jira_prefix}${issue_arg}"
# but `branch` is a special case that will parse the current git branch
if [[ "$action" == "br" ]]; then
local issue_arg=$(git rev-parse --abbrev-ref HEAD)
local issue="${jira_prefix}${issue_arg}"
else
local issue_arg=$action
local issue="${jira_prefix}${issue_arg}"
fi
local url_fragment=''
if [[ "$2" == "m" ]]; then
url_fragment="#add-comment"
Expand Down
2 changes: 1 addition & 1 deletion plugins/laravel5/laravel5.plugin.zsh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Laravel5 basic command completion
_laravel5_get_command_list () {
php artisan --no-ansi | sed "1,/Available commands/d" | awk '/^ +[a-z]+/ { print $1 }'
php artisan --raw --no-ansi list | sed "s/[[:space:]].*//g"
}

_laravel5 () {
Expand Down
21 changes: 19 additions & 2 deletions plugins/mix/_mix
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ _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'
'new:Create a new Elixir project'
'phoenix.digest:Digests and compress static files'
Expand All @@ -44,9 +46,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'
Expand All @@ -58,7 +75,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
}
Expand Down
1 change: 1 addition & 0 deletions plugins/mvn/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ plugins=(... mvn)
| `mvncist` | `mvn clean install -DskipTests` |
| `mvncisto` | `mvn clean install -DskipTests --offline` |
| `mvne` | `mvn eclipse:eclipse` |
| `mvncv` | `mvn clean verify` |
| `mvnd` | `mvn deploy` |
| `mvnp` | `mvn package` |
| `mvnc` | `mvn clean` |
Expand Down

0 comments on commit a6b63fb

Please sign in to comment.