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: (71 commits)
  added assembly alias (ohmyzsh#5107)
  Fix styling in cakephp3 completion
  Better cake3 completion
  Change vim command to $EDITOR for consistency (ohmyzsh#5063)
  fixed bower completion error from issue ohmyzsh#2694 (ohmyzsh#5056)
  vagrant snapshot (ohmyzsh#5032)
  Arcanist plugin (ohmyzsh#5106)
  completion: zsh: improve main function selection
  gitfast: fix the prompt colour
  gitfast: update to upstream v2.8
  Add alias for oneline git tree with --all option
  gitfast: update to upstream v2.4
  gitfast: update to upstream v2.0
  znt: update to v2.1.15
  Add rbenv support for ruby version display
  Fix deprecated usage (ohmyzsh#5050)
  Add 'gcn!' for the '--no-edit' option. (ohmyzsh#4830)
  Add mvn options to ignore test failures (ohmyzsh#5092)
  Add README to meteor plugin
  Add meteor plugin aliases
  ...
  • Loading branch information
banzera committed May 23, 2016
2 parents 5d6b17a + 1e90f36 commit 49f2524
Show file tree
Hide file tree
Showing 74 changed files with 2,092 additions and 334 deletions.
11 changes: 5 additions & 6 deletions .gitignore
@@ -1,9 +1,8 @@
locals.zsh
log/.zsh_history
projects.zsh
custom
# custom files
custom/
!custom/plugins/example
!custom/example.zsh
*.swp
!custom/example.zshcache

# temp files directories
cache/
log/
File renamed without changes.
12 changes: 6 additions & 6 deletions README.markdown → README.md
Expand Up @@ -12,9 +12,9 @@ To learn more, visit [ohmyz.sh](http://ohmyz.sh) and follow [@ohmyzsh](https://t

### Prerequisites

__Disclaimer:__ _Oh My Zsh works best on Mac OS X and Linux._
__Disclaimer:__ _Oh My Zsh works best on OS X and Linux._

* Unix-based operating system (Mac OS X or Linux)
* Unix-based operating system (OS X or Linux)
* [Zsh](http://www.zsh.org) should be installed (v4.3.9 or more recent). If not pre-installed (`zsh --version` to confirm), check the following instruction here: [Installing ZSH](https://github.com/robbyrussell/oh-my-zsh/wiki/Installing-ZSH)
* `curl` or `wget` should be installed
* `git` should be installed
Expand All @@ -26,13 +26,13 @@ Oh My Zsh is installed by running one of the following commands in your terminal
#### via curl

```shell
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
```

#### via wget

```shell
sh -c "$(wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
```

## Using Oh My Zsh
Expand Down Expand Up @@ -104,7 +104,7 @@ The default location is `~/.oh-my-zsh` (hidden in your home directory)
If you'd like to change the install directory with the `ZSH` environment variable, either by running `export ZSH=/your/path` before installing, or by setting it before the end of the install pipeline like this:

```shell
export ZSH="$HOME/.dotfiles/oh-my-zsh"; sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
export ZSH="$HOME/.dotfiles/oh-my-zsh"; sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
```

#### Manual Installation
Expand Down Expand Up @@ -210,4 +210,4 @@ We have [stickers](http://shop.planetargon.com/products/ohmyzsh-stickers-set-of-

## License

Oh My Zsh is released under the [MIT license](MIT-LICENSE.txt).
Oh My Zsh is released under the [MIT license](LICENSE.txt).
4 changes: 0 additions & 4 deletions cache/.easter-egg

This file was deleted.

Empty file added cache/.gitkeep
Empty file.
13 changes: 9 additions & 4 deletions custom/example.zsh
@@ -1,5 +1,10 @@
# Add yourself some shortcuts to projects you often work on
# Example:
# You can put files here to add functionality separated per file, which
# will be ignored by git.
# Files on the custom/ directory will be automatically loaded by the init
# script, in alphabetical order.

# For example: add yourself some shortcuts to projects you often work on.
#
# brainstormr=~/Projects/development/planetargon/brainstormr
# cd $brainstormr
#
# brainstormr=/Users/robbyrussell/Projects/development/planetargon/brainstormr
#
12 changes: 12 additions & 0 deletions lib/git.zsh
Expand Up @@ -188,6 +188,18 @@ function git_compare_version() {
echo 0
}

# Outputs the name of the current user
# Usage example: $(git_current_user_name)
function git_current_user_name() {
command git config user.name 2>/dev/null
}

# Outputs the email of the current user
# Usage example: $(git_current_user_email)
function git_current_user_email() {
command git config user.email 2>/dev/null
}

# This is unlikely to change so make it all statically assigned
POST_1_7_2_GIT=$(git_compare_version "1.7.2")
# Clean up the namespace slightly by removing the checker function
Expand Down
8 changes: 3 additions & 5 deletions lib/theme-and-appearance.zsh
Expand Up @@ -11,9 +11,9 @@ then
# otherwise, leave ls as is, because NetBSD's ls doesn't support -G
gls --color -d . &>/dev/null 2>&1 && alias ls='gls --color=tty'
elif [[ "$(uname -s)" == "OpenBSD" ]]; then
# On OpenBSD, "gls" (ls from GNU coreutils) and "colorls" (ls from base,
# with color and multibyte support) are available from ports. "colorls"
# will be installed on purpose and can't be pulled in by installing
# On OpenBSD, "gls" (ls from GNU coreutils) and "colorls" (ls from base,
# with color and multibyte support) are available from ports. "colorls"
# will be installed on purpose and can't be pulled in by installing
# coreutils, so prefer it to "gls".
gls --color -d . &>/dev/null 2>&1 && alias ls='gls --color=tty'
colorls -G -d . &>/dev/null 2>&1 && alias ls='colorls -G'
Expand All @@ -22,10 +22,8 @@ then
fi
fi

#setopt no_beep
setopt auto_cd
setopt multios
setopt cdablevars

if [[ x$WINDOW != x ]]
then
Expand Down
4 changes: 0 additions & 4 deletions log/.easter-egg

This file was deleted.

Empty file added log/.gitkeep
Empty file.
5 changes: 5 additions & 0 deletions plugins/arcanist/README.md
@@ -0,0 +1,5 @@
## arcanist

**Maintainer:** [@emzar](https://github.com/emzar)

This plugin adds many useful aliases.
21 changes: 21 additions & 0 deletions plugins/arcanist/arcanist.plugin.zsh
@@ -0,0 +1,21 @@
#
# Aliases
# (sorted alphabetically)
#

alias ara='arc amend'
alias arb='arc branch'
alias arc='arc cover'
alias arci='arc commit'

alias ard='arc diff'
alias ardnu='arc diff --nounit'
alias ardnupc='arc diff --nounit --plan-changes'
alias ardpc='arc diff --plan-changes'

alias are='arc export'
alias arh='arc help'
alias arl='arc land'
alias arli='arc lint'
alias arls='arc list'
alias arp='arc patch'
27 changes: 27 additions & 0 deletions plugins/asdf/README.md
@@ -0,0 +1,27 @@
## asdf

**Maintainer:** [@RobLoach](https://github.com/RobLoach)

Adds integration with [asdf](https://github.com/asdf-vm/asdf), the extendable version manager, with support for Ruby, Node.js, Elixir, Erlang and more.

### Installation

1. Enable the plugin by adding it to your `plugins` definition in `~/.zshrc`.

```
plugins=(asdf)
```

2. [Install asdf](https://github.com/asdf-vm/asdf#setup) by running the following:
```
git clone https://github.com/asdf-vm/asdf.git ~/.asdf
```

### Usage

See the [asdf usage documentation](https://github.com/asdf-vm/asdf#usage) for information on how to use asdf:

```
asdf plugin-add nodejs git@github.com:asdf-vm/asdf-nodejs.git
asdf install nodejs 5.9.1
```
7 changes: 7 additions & 0 deletions plugins/asdf/asdf.plugin.zsh
@@ -0,0 +1,7 @@
# Find where asdf should be installed.
ASDF_DIR="${ASDF_DIR:-$HOME/.asdf}"

# Load asdf, if found.
if [ -f $ASDF_DIR/asdf.sh ]; then
. $ASDF_DIR/asdf.sh
fi
1 change: 1 addition & 0 deletions plugins/bower/bower.plugin.zsh
Expand Up @@ -72,6 +72,7 @@ _bower ()
compadd "$@" $(echo $bower_package_list)
;;
*)
_arguments \
$_no_color \
;;
esac
Expand Down
1 change: 1 addition & 0 deletions plugins/bundler/README.md
Expand Up @@ -6,6 +6,7 @@
- `bl` aliased to `bundle list`
- `bp` aliased to `bundle package`
- `bo` aliased to `bundle open`
- `bout` aliased to `bundle outdated`
- `bu` aliased to `bundle update`
- `bi` aliased to `bundle install --jobs=<cpu core count>` (only for bundler `>= 1.4.0`)
- adds a wrapper for common gems:
Expand Down
27 changes: 23 additions & 4 deletions plugins/cakephp3/cakephp3.plugin.zsh
@@ -1,11 +1,31 @@
# CakePHP 3 basic command completion
_cakephp3_get_command_list () {
cakephp3commands=($(bin/cake completion commands));printf "%s\n" "${cakephp3commands[@]}"
bin/cake Completion commands
}

_cakephp3_get_sub_command_list () {
bin/cake Completion subcommands ${words[2]}
}

_cakephp3_get_3rd_argument () {
bin/cake ${words[2]} ${words[3]} | \grep '\-\ '| \awk '{print $2}'
}

_cakephp3 () {
if [ -f bin/cake ]; then
compadd `_cakephp3_get_command_list`
local -a has3rdargument
has3rdargument=("all" "controller" "fixture" "model" "template")
if [ -f bin/cake ]; then
if (( CURRENT == 2 )); then
compadd $(_cakephp3_get_command_list)
fi
if (( CURRENT == 3 )); then
compadd $(_cakephp3_get_sub_command_list)
fi
if (( CURRENT == 4 )); then
if [[ ${has3rdargument[(i)${words[3]}]} -le ${#has3rdargument} ]]; then
compadd $(_cakephp3_get_3rd_argument)
fi
fi
fi
}

Expand All @@ -14,6 +34,5 @@ compdef _cakephp3 cake

#Alias
alias c3='bin/cake'

alias c3cache='bin/cake orm_cache clear'
alias c3migrate='bin/cake migrations migrate'
2 changes: 1 addition & 1 deletion plugins/fasd/fasd.plugin.zsh
Expand Up @@ -6,6 +6,6 @@ if [ $commands[fasd] ]; then # check if fasd is installed
source "$fasd_cache"
unset fasd_cache

alias v='f -e vim'
alias v="f -e $EDITOR"
alias o='a -e open_command'
fi
7 changes: 7 additions & 0 deletions plugins/fossil/README.md
@@ -0,0 +1,7 @@
## Fossil Plugin

This plugin adds completion support and prompt for fossil repositories.
The prompt will display the current branch and status been dirty or clean.

### CONTRIBUTOR
- Jefferson González ([jgmdev](https://github.com/jgmdev))
89 changes: 89 additions & 0 deletions plugins/fossil/fossil.plugin.zsh
@@ -0,0 +1,89 @@
_FOSSIL_PROMPT=""

# Prefix at the very beginning of the prompt, before the branch name
ZSH_THEME_FOSSIL_PROMPT_PREFIX="%{$fg_bold[blue]%}fossil:(%{$fg_bold[red]%}"

# At the very end of the prompt
ZSH_THEME_FOSSIL_PROMPT_SUFFIX="%{$fg_bold[blue]%})"

# Text to display if the branch is dirty
ZSH_THEME_FOSSIL_PROMPT_DIRTY=" %{$fg_bold[red]%}✖"

# Text to display if the branch is clean
ZSH_THEME_FOSSIL_PROMPT_CLEAN=" %{$fg_bold[green]%}✔"

function fossil_prompt_info () {
local _OUTPUT=`fossil branch 2>&1`
local _STATUS=`echo $_OUTPUT | grep "use --repo"`
if [ "$_STATUS" = "" ]; then
local _EDITED=`fossil changes`
local _EDITED_SYM="$ZSH_THEME_FOSSIL_PROMPT_CLEAN"
local _BRANCH=`echo $_OUTPUT | grep "* " | sed 's/* //g'`

if [ "$_EDITED" != "" ]; then
_EDITED_SYM="$ZSH_THEME_FOSSIL_PROMPT_DIRTY"
fi

echo "$ZSH_THEME_FOSSIL_PROMPT_PREFIX" \
"$_BRANCH" \
"$ZSH_THEME_FOSSIL_PROMPT_SUFFIX" \
"$_EDITED_SYM"\
"%{$reset_color%}"
fi
}

function _fossil_get_command_list () {
fossil help -a | grep -v "Usage|Common|This is"
}

function _fossil () {
local context state state_descr line
typeset -A opt_args

_arguments \
'1: :->command'\
'2: :->subcommand'

case $state in
command)
local _OUTPUT=`fossil branch 2>&1 | grep "use --repo"`
if [ "$_OUTPUT" = "" ]; then
compadd `_fossil_get_command_list`
else
compadd clone init import help version
fi
;;
subcommand)
if [ "$words[2]" = "help" ]; then
compadd `_fossil_get_command_list`
else
compcall -D
fi
;;
esac
}

function _fossil_prompt () {
local current=`echo $PROMPT $RPROMPT | grep fossil`

if [ "$_FOSSIL_PROMPT" = "" -o "$current" = "" ]; then
local _prompt=${PROMPT}
local _rprompt=${RPROMPT}

local is_prompt=`echo $PROMPT | grep git`

if [ "$is_prompt" = "" ]; then
export RPROMPT="$_rprompt"'$(fossil_prompt_info)'
else
export PROMPT="$_prompt"'$(fossil_prompt_info) '
fi

_FOSSIL_PROMPT="1"
fi
}

compdef _fossil fossil

autoload -U add-zsh-hook

add-zsh-hook precmd _fossil_prompt
12 changes: 12 additions & 0 deletions plugins/geeknote/README.md
@@ -0,0 +1,12 @@
## ZSH-Geeknote

[Geeknote](https://github.com/VitaliyRodnenko/geeknote) plugin for [oh-my-zsh framework](http://github.com/robbyrussell/oh-my-zsh).

Plugins provides:

- auto completion of commands and their options
- alias `gn`

You can find information how to install Geeknote and it's available commands on the [project website](http://www.geeknote.me/).

Maintainer : Ján Koščo ([@s7anley](https://twitter.com/s7anley))

0 comments on commit 49f2524

Please sign in to comment.