Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
* 'master' of https://github.com/clairegriffin/oh-my-zsh: (114 commits)
  Add most recent java
  updated java
  Rename getgb plugin to gb
  Rename gb completion file to more conventional _gb
  Fix formatting of gb plugin completion
  Add more information to the README
  Add README to gb plugin
  Add plugin for Gb completion (http://getgb.io)
  bundler plugin: Simplify retrieval of cpu count on OSX (ohmyzsh#5180)
  Fix gfg function completion definition
  Fix man-preview completion definition
  Fix issue with `dash` as the default `/bin/sh` script executing program. (ohmyzsh#5177)
  znt: update to v2.2.1 (ohmyzsh#5174)
  emacs plugin tweak to open buffer from stdin (ohmyzsh#5126)
  Update taskwarrior completion to 2.5.1 (ohmyzsh#5171)
  Remove undesirable hardcoding of PATH into zshrc (ohmyzsh#4925)
  Add README for OSX plugin and refactor plugin file
  Open finder to PWD - part 2 (ohmyzsh#5165)
  Add ofd() to OSX plugin to open finder on current directory (ohmyzsh#5164)
  add 'mvn clean install -DskipTests --offline' alias to speed up maven compile (ohmyzsh#5153)
  ...
  • Loading branch information
clairegriffin committed Feb 11, 2017
2 parents eab9ad5 + bcebce4 commit 76265cf
Show file tree
Hide file tree
Showing 95 changed files with 2,798 additions and 424 deletions.
11 changes: 5 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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.
17 changes: 12 additions & 5 deletions custom/claire.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ alias macvim="open -a MacVim"
alias timer='echo "Timer started. Stop with Ctrl-D." && date && time cat && date'

# Get OS X Software Updates, and update installed Ruby gems, Homebrew, npm, and their installed packages
alias update='brew update; brew upgrade --all; brew cleanup; npm install npm -g; npm update -g; sudo gem update --system; sudo gem update'
alias update='mas outdated; mas upgrade; brew update; brew upgrade --all; brew cleanup; npm install npm -g; npm update -g; sudo gem update --system; sudo gem update'

# IP addresses
alias ip="dig +short myip.opendns.com @resolver1.opendns.com"
Expand Down Expand Up @@ -57,17 +57,24 @@ alias spotoff="sudo mdutil -a -i off"
alias spoton="sudo mdutil -a -i on"

# developer paths
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_72.jdk/Contents/Home
export ANT_HOME=/usr/local/bin/ant
export MAVEN_HOME=/usr/local/Cellar/maven/3.3.3/libexec
JAVA7_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_76.jdk/Contents/Home
JAVA8_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_102.jdk/Contents/Home
export JAVA_HOME=$JAVA8_HOME

export ANT_HOME=/usr/local/Cellar/ant/1.9.7/libexec
export MAVEN_HOME=/usr/local/Cellar/maven/3.3.9/libexec
export GRADLE_HOME=/usr/local/Cellar/gradle/2.14/libexec

# lockss support
export PROJECTS_DIR=/Users/claire/projects
export LOCKSS_DIR=/Users/claire/projects/lockss
export DAEMON_DIR=/Users/claire/projects/lockss/lockss-daemon
export CRAWLJAX_DIR=/Users/claire/projects/lockss/lockss-crawljax
export LAAWS_DIR=/Users/claire/projects/lockss/laaws
export SWAGGER_CODEGEN=/Users/claire/projects/gitrepos/swagger-codegen/modules/swagger-codegen-cli/target

alias genswagger='java -jar $SWAGGER_CODEGEN/swagger-codegen-cli.jar'
alias lockss='cd $LOCKSS_DIR'
alias lockssd='cd $DAEMON_DIR'
alias run1dc='cd $DAEMON_DIR/test/frameworks/run_one_daemon_clockss'
alias run1d='cd $DAEMON_DIR/test/frameworks/run_one_daemon'
alias laaws='cd $LAAWS_DIR'
13 changes: 9 additions & 4 deletions custom/example.zsh
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#
# Aliases
# (sorted alphabetically)
#

alias ara='arc amend'
alias arb='arc branch'
alias arco='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 arpa='arc patch'
27 changes: 27 additions & 0 deletions plugins/asdf/README.md
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ _bower ()
compadd "$@" $(echo $bower_package_list)
;;
*)
_arguments \
$_no_color \
;;
esac
Expand Down
7 changes: 6 additions & 1 deletion plugins/branch/branch.plugin.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,12 @@ function branch_prompt_info() {
# Mercurial repository
if [[ -d "${current_dir}/.hg" ]]
then
echo '' $(<"$current_dir/.hg/branch")
if [[ -f "$current_dir/.hg/branch" ]]
then
echo '' $(<"$current_dir/.hg/branch")
else
echo '☿ default'
fi
return;
fi
# Defines path as parent directory and keeps looking for :)
Expand Down
1 change: 1 addition & 0 deletions plugins/bundler/README.md
Original file line number Diff line number Diff line change
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
2 changes: 1 addition & 1 deletion plugins/bundler/bundler.plugin.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ bundle_install() {
if [[ $bundler_version > '1.4.0' || $bundler_version = '1.4.0' ]]; then
if [[ "$OSTYPE" = darwin* ]]
then
local cores_num="$(sysctl hw.ncpu | awk '{print $2}')"
local cores_num="$(sysctl -n hw.ncpu)"
else
local cores_num="$(nproc)"
fi
Expand Down
27 changes: 23 additions & 4 deletions plugins/cakephp3/cakephp3.plugin.zsh
Original file line number Diff line number Diff line change
@@ -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'
30 changes: 23 additions & 7 deletions plugins/emacs/emacsclient.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,28 @@
#!/bin/sh

# get list of available X windows.
x=`emacsclient --alternate-editor '' --eval '(x-display-list)' 2>/dev/null`
_emacsfun()
{
# get list of available X windows.
x=`emacsclient --alternate-editor '' --eval '(x-display-list)' 2>/dev/null`

if [ -z "$x" ] || [ "$x" = "nil" ] ;then
# Create one if there is no X window yet.
emacsclient --alternate-editor "" --create-frame "$@"
if [ -z "$x" ] || [ "$x" = "nil" ] ;then
# Create one if there is no X window yet.
emacsclient --alternate-editor "" --create-frame "$@"
else
# prevent creating another X frame if there is at least one present.
emacsclient --alternate-editor "" "$@"
fi
}


# adopted from https://github.com/davidshepherd7/emacs-read-stdin/blob/master/emacs-read-stdin.sh
# If the second argument is - then write stdin to a tempfile and open the
# tempfile. (first argument will be `--no-wait` passed in by the plugin.zsh)
if [ "$#" -ge "2" -a "$2" = "-" ]
then
tempfile="$(mktemp emacs-stdin-$USER.XXXXXXX --tmpdir)"
cat - > "$tempfile"
_emacsfun --no-wait $tempfile
else
# prevent creating another X frame if there is at least one present.
emacsclient --alternate-editor "" "$@"
_emacsfun "$@"
fi
2 changes: 1 addition & 1 deletion plugins/fasd/fasd.plugin.zsh
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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))
Loading

0 comments on commit 76265cf

Please sign in to comment.