Merge pull request #363 from Blattlaus/master
Ant plugin: stat command doesn't work under linuxpull/4/head
commit
207f138119
@ -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"
|
||||||
|
}
|
@ -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"
|
||||||
|
}
|
@ -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:&|'`
|
@ -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
|
@ -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'
|
alias sgem='sudo gem'
|
||||||
|
|
||||||
# Find ruby file
|
# Find ruby file
|
||||||
alias rfind='find . -name *.rb | xargs grep -n'
|
alias rfind='find . -name *.rb | xargs grep -n'
|
||||||
|
@ -1,3 +1,52 @@
|
|||||||
fpath=($ZSH/plugins/rvm $fpath)
|
fpath=($ZSH/plugins/rvm $fpath)
|
||||||
autoload -U compinit
|
autoload -U compinit
|
||||||
compinit -i
|
compinit -i
|
||||||
|
|
||||||
|
alias rubies='rvm list rubies'
|
||||||
|
alias gemsets='rvm gemset list'
|
||||||
|
|
||||||
|
local ruby18='ruby-1.8.7-p334'
|
||||||
|
local ruby19='ruby-1.9.2-p180'
|
||||||
|
|
||||||
|
function rb18 {
|
||||||
|
if [ -z "$1" ]; then
|
||||||
|
rvm use "$ruby18"
|
||||||
|
else
|
||||||
|
rvm use "$ruby18@$1"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
_rb18() {compadd `ls -1 $rvm_path/gems | grep "^$ruby18@" | sed -e "s/^$ruby18@//" | awk '{print $1}'`}
|
||||||
|
compdef _rb18 rb18
|
||||||
|
|
||||||
|
function rb19 {
|
||||||
|
if [ -z "$1" ]; then
|
||||||
|
rvm use "$ruby19"
|
||||||
|
else
|
||||||
|
rvm use "$ruby19@$1"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
_rb19() {compadd `ls -1 $rvm_path/gems | grep "^$ruby19@" | sed -e "s/^$ruby19@//" | awk '{print $1}'`}
|
||||||
|
compdef _rb19 rb19
|
||||||
|
|
||||||
|
function rvm-update {
|
||||||
|
rvm get head
|
||||||
|
rvm reload # TODO: Reload rvm completion?
|
||||||
|
}
|
||||||
|
|
||||||
|
function rvm-link-completion {
|
||||||
|
ln -s "$rvm_path/scripts/zsh/Completion/_rvm" "$ZSH/plugins/rvm/_rvm.official"
|
||||||
|
}
|
||||||
|
|
||||||
|
# TODO: Make this usable w/o rvm.
|
||||||
|
function gems {
|
||||||
|
local current_ruby=`rvm-prompt i v p`
|
||||||
|
local current_gemset=`rvm-prompt g`
|
||||||
|
|
||||||
|
gem list $@ | sed \
|
||||||
|
-Ee "s/\([0-9\.]+( .+)?\)/$fg[blue]&$reset_color/g" \
|
||||||
|
-Ee "s|$(echo $rvm_path)|$fg[magenta]\$rvm_path$reset_color|g" \
|
||||||
|
-Ee "s/$current_ruby@global/$fg[yellow]&$reset_color/g" \
|
||||||
|
-Ee "s/$current_ruby$current_gemset$/$fg[green]&$reset_color/g"
|
||||||
|
}
|
||||||
|
@ -0,0 +1,4 @@
|
|||||||
|
#compdef thor
|
||||||
|
#autoload
|
||||||
|
|
||||||
|
compadd `thor list | grep thor | cut -d " " -f 2`
|
@ -0,0 +1,15 @@
|
|||||||
|
ZSH_THEME_GIT_PROMPT_PREFIX="%{$reset_color%}%{$fg[white]%}["
|
||||||
|
ZSH_THEME_GIT_PROMPT_SUFFIX="]%{$reset_color%}"
|
||||||
|
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}●%{$reset_color%}"
|
||||||
|
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
||||||
|
|
||||||
|
#Customized git status, oh-my-zsh currently does not allow render dirty status before branch
|
||||||
|
git_custom_status() {
|
||||||
|
local cb=$(current_branch)
|
||||||
|
if [ -n "$cb" ]; then
|
||||||
|
echo "- $ZSH_THEME_GIT_PROMPT_PREFIX$(current_branch)$(parse_git_dirty)$ZSH_THEME_GIT_PROMPT_SUFFIX"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
PROMPT='%2~ $(git_custom_status) »%b '
|
Loading…
Reference in new issue