forked from ohmyzsh/ohmyzsh
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of git://github.com/robbyrussell/oh-my-zsh into…
… taskwarrior-plugin
- Loading branch information
Showing
31 changed files
with
598 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ locals.zsh | |
log/.zsh_history | ||
projects.zsh | ||
custom/* | ||
!custom/example | ||
!custom/example.zsh | ||
cache | ||
*.swp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Add your own custom plugins in the custom/plugins directory. Plugins placed | ||
# here will override ones with the same name in the main plugins directory. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
stat -f%m . > /dev/null 2>&1 | ||
if [ "$?" = 0 ]; then | ||
stat_cmd=(stat -f%m) | ||
else | ||
stat_cmd=(stat -L --format=%y) | ||
fi | ||
|
||
_ant_does_target_list_need_generating () { | ||
if [ ! -f .ant_targets ]; then return 0; | ||
else | ||
accurate=$($stat_cmd -f%m .ant_targets) | ||
changed=$($stat_cmd -f%m build.xml) | ||
return $(expr $accurate '>=' $changed) | ||
fi | ||
} | ||
|
||
_ant () { | ||
if [ -f build.xml ]; then | ||
if _ant_does_target_list_need_generating; then | ||
sed -n '/<target/s/<target.*name="\([^"]*\).*$/\1/p' build.xml > .ant_targets | ||
fi | ||
compadd `cat .ant_targets` | ||
fi | ||
} | ||
|
||
compdef _ant ant |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
if [ -f `brew --prefix`/etc/autojump ]; then | ||
. `brew --prefix`/etc/autojump | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Move /usr/local/bin (path where brews are linked) to the front of the path | ||
# This will allow us to override system binaries like ruby with our brews | ||
# TODO: Do this in a more compatible way. | ||
# What if someone doesn't have /usr/bin in their path? | ||
export PATH=`echo $PATH | sed -e 's|/usr/local/bin||' -e 's|::|:|g'` # Remove /usr/local/bin | ||
export PATH=`echo $PATH | sed -e 's|/usr/bin|/usr/local/bin:&|'` # Add it in front of /usr/bin | ||
export PATH=`echo $PATH | sed -e 's|/usr/bin|/usr/local/sbin:&|'` # Add /usr/local/sbin | ||
|
||
alias brews='brew list -1' | ||
|
||
function brew-link-completion { | ||
ln -s "$(brew --prefix)/Library/Contributions/brew_zsh_completion.zsh" "$ZSH/plugins/brew/_brew.official" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,4 +18,4 @@ function _cap () { | |
fi | ||
} | ||
|
||
compctl -K _cap cap | ||
compctl -K _cap cap |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,3 @@ if [ "$commands[(I)hub]" ]; then | |
# eval `hub alias -s zsh` | ||
function git(){hub "$@"} | ||
fi | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Based on ssh-agent code | ||
|
||
local GPG_ENV=$HOME/.gnupg/gpg-agent.env | ||
|
||
function start_agent { | ||
/usr/bin/env gpg-agent --daemon --enable-ssh-support --write-env-file ${GPG_ENV} > /dev/null | ||
chmod 600 ${GPG_ENV} | ||
. ${GPG_ENV} > /dev/null | ||
} | ||
|
||
# Source GPG agent settings, if applicable | ||
if [ -f "${GPG_ENV}" ]; then | ||
. ${GPG_ENV} > /dev/null | ||
ps -ef | grep ${SSH_AGENT_PID} | grep gpg-agent > /dev/null || { | ||
start_agent; | ||
} | ||
else | ||
start_agent; | ||
fi | ||
|
||
export GPG_AGENT_INFO | ||
export SSH_AUTH_SOCK | ||
export SSH_AGENT_PID | ||
|
||
GPG_TTY=$(tty) | ||
export GPG_TTY |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# This works if you installed node via homebrew. | ||
export NODE_PATH="/usr/local/lib/node" | ||
|
||
# Open the node api for your current version to the optional section. | ||
# TODO: Make the section part easier to use. | ||
function node-api { | ||
open "http://nodejs.org/docs/$(node --version)/api/all.html#$1" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# TODO: Don't do this in such a weird way. | ||
export PATH=`echo $PATH | sed -e 's|/usr/bin|/usr/local/share/npm/bin:&|'` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Thanks to Christopher Sexton | ||
# https://gist.github.com/965032 | ||
function kapow { | ||
touch ~/.pow/$1/tmp/restart.txt | ||
if [ $? -eq 0 ]; then | ||
echo "$fg[yellow]Pow restarting $1...$reset_color" | ||
fi | ||
} | ||
|
||
compctl -W ~/.pow -/ kapow |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
# TODO: Make this compatible with rvm. | ||
# Run sudo gem on the system ruby, not the active ruby. | ||
alias sgem='sudo gem' | ||
|
||
# Find ruby file | ||
alias rfind='find . -name *.rb | xargs grep -n' | ||
alias rfind='find . -name *.rb | xargs grep -n' |
Oops, something went wrong.