commit
86b8827d27
16 changed files with 139 additions and 97 deletions
@ -1,8 +1,5 @@ |
||||
# 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 { |
||||
function node-docs { |
||||
open "http://nodejs.org/docs/$(node --version)/api/all.html#$1" |
||||
} |
||||
|
||||
@ -1,2 +0,0 @@ |
||||
# 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,22 @@ |
||||
|
||||
local user='%{$fg[magenta]%}%n@%{$fg[magenta]%}%m%{$reset_color%}' |
||||
local pwd='%{$fg[blue]%}%~%{$reset_color%}' |
||||
local rvm='%{$fg[green]%}‹$(rvm-prompt i v g)›%{$reset_color%}' |
||||
local return_code='%(?..%{$fg[red]%}%? ↵%{$reset_color%})' |
||||
local git_branch='$(git_prompt_status)%{$reset_color%}$(git_prompt_info)%{$reset_color%}' |
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%}" |
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" |
||||
ZSH_THEME_GIT_PROMPT_DIRTY="" |
||||
ZSH_THEME_GIT_PROMPT_CLEAN="" |
||||
|
||||
ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[green]%} ✚" |
||||
ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[blue]%} ✹" |
||||
ZSH_THEME_GIT_PROMPT_DELETED="%{$fg[red]%} ✖" |
||||
ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[magenta]%} ➜" |
||||
ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[yellow]%} ═" |
||||
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[cyan]%} ✭" |
||||
|
||||
PROMPT="${user} ${pwd}$ " |
||||
RPROMPT="${return_code} ${git_branch} ${rvm}" |
||||
|
||||
@ -0,0 +1,26 @@ |
||||
# ZSH THEME Preview: https://skitch.com/huyy/rk979/humza.zshtheme |
||||
|
||||
let TotalBytes=0 |
||||
for Bytes in $(ls -l | grep "^-" | awk '{ print $5 }') |
||||
do |
||||
let TotalBytes=$TotalBytes+$Bytes |
||||
done |
||||
# should it say b, kb, Mb, or Gb |
||||
if [ $TotalBytes -lt 1024 ]; then |
||||
TotalSize=$(echo -e "scale=3 \n$TotalBytes \nquit" | bc) |
||||
suffix="b" |
||||
elif [ $TotalBytes -lt 1048576 ]; then |
||||
TotalSize=$(echo -e "scale=3 \n$TotalBytes/1024 \nquit" | bc) |
||||
suffix="kb" |
||||
elif [ $TotalBytes -lt 1073741824 ]; then |
||||
TotalSize=$(echo -e "scale=3 \n$TotalBytes/1048576 \nquit" | bc) |
||||
suffix="Mb" |
||||
else |
||||
TotalSize=$(echo -e "scale=3 \n$TotalBytes/1073741824 \nquit" | bc) |
||||
suffix="Gb" |
||||
fi |
||||
|
||||
PROMPT='%{$reset_color%}%n %{$fg[green]%}{%{$reset_color%}%~%{$fg[green]%}}%{$reset_color%}$(git_prompt_info) greetings, earthling %{$fg[green]%}[%{$reset_color%}%{$TotalSize%}%{$suffix%}%{$fg[green]%}]%{$fg[red]%}$%{$reset_color%} ☞ ' |
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[red]%}±(" |
||||
ZSH_THEME_GIT_PROMPT_SUFFIX=");%{$reset_color%}" |
||||
@ -0,0 +1,8 @@ |
||||
# Yay! High voltage and arrows! |
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$reset_color%}%{$fg[green]%}" |
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} " |
||||
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[yellow]%}⚡%{$reset_color%}" |
||||
ZSH_THEME_GIT_PROMPT_CLEAN="" |
||||
|
||||
PROMPT='%{$fg[cyan]%}%1~%{$reset_color%}%{$fg[red]%}|%{$reset_color%}$(git_prompt_info)%{$fg[cyan]%}⇒%{$reset_color%} ' |
||||
@ -0,0 +1,17 @@ |
||||
# Based on robbyrussell's theme, with host and rvm indicators. Example: |
||||
# @host ➜ currentdir rvm:(rubyversion@gemset) git:(branchname) |
||||
|
||||
# Get the current ruby version in use with RVM: |
||||
if [ -e ~/.rvm/bin/rvm-prompt ]; then |
||||
RUBY_PROMPT_="%{$fg_bold[blue]%}rvm:(%{$fg[green]%}\$(~/.rvm/bin/rvm-prompt s i v g)%{$fg_bold[blue]%})%{$reset_color%} " |
||||
fi |
||||
|
||||
# Get the host name (first 4 chars) |
||||
HOST_PROMPT_="%{$fg_bold[red]%}@$HOST[0,4] ➜ %{$fg_bold[cyan]%}%c " |
||||
GIT_PROMPT="%{$fg_bold[blue]%}\$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}" |
||||
PROMPT="$HOST_PROMPT_$RUBY_PROMPT_$GIT_PROMPT" |
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}" |
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" |
||||
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗%{$reset_color%}" |
||||
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})" |
||||
@ -0,0 +1,26 @@ |
||||
# Git-centric variation of the "fishy" theme. |
||||
# See screenshot at http://ompldr.org/vOHcwZg |
||||
|
||||
ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[green]%}+" |
||||
ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[magenta]%}!" |
||||
ZSH_THEME_GIT_PROMPT_DELETED="%{$fg[red]%}-" |
||||
ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[blue]%}>" |
||||
ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[cyan]%}#" |
||||
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[yellow]%}?" |
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="" |
||||
ZSH_THEME_GIT_PROMPT_SUFFIX=" " |
||||
ZSH_THEME_GIT_PROMPT_DIRTY="" |
||||
ZSH_THEME_GIT_PROMPT_CLEAN="" |
||||
|
||||
local user_color='green' |
||||
test $UID -eq 0 && user_color='red' |
||||
|
||||
PROMPT='%(?..%{$fg_bold[red]%}exit %? |
||||
%{$reset_color%})'\ |
||||
'%{$bold_color%}$(git_prompt_status)%{$reset_color%}'\ |
||||
'$(git_prompt_info)'\ |
||||
'%{$fg[$user_color]%}%~%{$reset_color%}'\ |
||||
'%(!.#.>) ' |
||||
|
||||
PROMPT2='%{$fg[red]%}\ %{$reset_color%}' |
||||
@ -1,29 +0,0 @@ |
||||
function prompt_char { |
||||
git branch >/dev/null 2>/dev/null && echo '±' && return |
||||
hg root >/dev/null 2>/dev/null && echo '☿' && return |
||||
echo '○' |
||||
} |
||||
|
||||
function virtualenv_info { |
||||
[ $VIRTUAL_ENV ] && echo '('`basename $VIRTUAL_ENV`') ' |
||||
} |
||||
|
||||
function hg_prompt_info { |
||||
hg prompt --angle-brackets "\ |
||||
< on %{$fg[magenta]%}<branch>%{$reset_color%}>\ |
||||
< at %{$fg[yellow]%}<tags|%{$reset_color%}, %{$fg[yellow]%}>%{$reset_color%}>\ |
||||
%{$fg[green]%}<status|modified|unknown><update>%{$reset_color%}< |
||||
patches: <patches|join( → )|pre_applied(%{$fg[yellow]%})|post_applied(%{$reset_color%})|pre_unapplied(%{$fg_bold[black]%})|post_unapplied(%{$reset_color%})>>" 2>/dev/null |
||||
} |
||||
|
||||
PROMPT=' |
||||
%{$fg[magenta]%}%n%{$reset_color%} at %{$fg[yellow]%}%m%{$reset_color%} in %{$fg_bold[green]%}${PWD/#$HOME/~}%{$reset_color%}$(hg_prompt_info)$(git_prompt_info) |
||||
$(virtualenv_info)$(prompt_char) ' |
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[magenta]%}" |
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" |
||||
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[green]%}!" |
||||
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[green]%}?" |
||||
ZSH_THEME_GIT_PROMPT_CLEAN="" |
||||
|
||||
. ~/bin/dotfiles/zsh/aliases |
||||
@ -1,36 +1,36 @@ |
||||
if [ -d ~/.oh-my-zsh ] |
||||
then |
||||
echo "You already have Oh My Zsh installed. You'll need to remove ~/.oh-my-zsh if you want to install" |
||||
echo "\033[0;33mYou already have Oh My Zsh installed.\033[0m You'll need to remove ~/.oh-my-zsh if you want to install" |
||||
exit |
||||
fi |
||||
|
||||
echo "Cloning Oh My Zsh..." |
||||
echo "\033[0;34mCloning Oh My Zsh...\033[0m" |
||||
/usr/bin/env git clone https://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh |
||||
|
||||
echo "Looking for an existing zsh config..." |
||||
echo "\033[0;34mLooking for an existing zsh config...\033[0m" |
||||
if [ -f ~/.zshrc ] || [ -h ~/.zshrc ] |
||||
then |
||||
echo "Found ~/.zshrc. Backing up to ~/.zshrc.pre-oh-my-zsh"; |
||||
echo "\033[0;33mFound ~/.zshrc.\033[0m \033[0;32]Backing up to ~/.zshrc.pre-oh-my-zsh\033[0m"; |
||||
cp ~/.zshrc ~/.zshrc.pre-oh-my-zsh; |
||||
rm ~/.zshrc; |
||||
fi |
||||
|
||||
echo "Using the Oh My Zsh template file and adding it to ~/.zshrc" |
||||
echo "\033[0;34mUsing the Oh My Zsh template file and adding it to ~/.zshrc\033[0m" |
||||
cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc |
||||
|
||||
echo "Copying your current PATH and adding it to the end of ~/.zshrc for you." |
||||
echo "\033[0;34mCopying your current PATH and adding it to the end of ~/.zshrc for you.\033[0m" |
||||
echo "export PATH=$PATH" >> ~/.zshrc |
||||
|
||||
echo "Time to change your default shell to zsh!" |
||||
echo "\033[0;34mTime to change your default shell to zsh!\033[0m" |
||||
chsh -s `which zsh` |
||||
|
||||
echo ' __ __ ' |
||||
echo ' ____ / /_ ____ ___ __ __ ____ _____/ /_ ' |
||||
echo ' / __ \/ __ \ / __ `__ \/ / / / /_ / / ___/ __ \ ' |
||||
echo '/ /_/ / / / / / / / / / / /_/ / / /_(__ ) / / / ' |
||||
echo '\____/_/ /_/ /_/ /_/ /_/\__, / /___/____/_/ /_/ ' |
||||
echo ' /____/' |
||||
echo "\033[0;32m"' __ __ '"\033[0m" |
||||
echo "\033[0;32m"' ____ / /_ ____ ___ __ __ ____ _____/ /_ '"\033[0m" |
||||
echo "\033[0;32m"' / __ \/ __ \ / __ `__ \/ / / / /_ / / ___/ __ \ '"\033[0m" |
||||
echo "\033[0;32m"'/ /_/ / / / / / / / / / / /_/ / / /_(__ ) / / / '"\033[0m" |
||||
echo "\033[0;32m"'\____/_/ /_/ /_/ /_/ /_/\__, / /___/____/_/ /_/ '"\033[0m" |
||||
echo "\033[0;32m"' /____/ '"\033[0m" |
||||
|
||||
echo "\n\n ....is now installed." |
||||
echo "\n\n \033[0;32m....is now installed.\033[0m" |
||||
/usr/bin/env zsh |
||||
source ~/.zshrc |
||||
|
||||
@ -1,12 +1,12 @@ |
||||
current_path=`pwd` |
||||
echo "Upgrading Oh My Zsh" |
||||
echo "\033[0;34mUpgrading Oh My Zsh\033[0m" |
||||
( cd $ZSH && git pull origin master ) |
||||
echo ' __ __ ' |
||||
echo ' ____ / /_ ____ ___ __ __ ____ _____/ /_ ' |
||||
echo ' / __ \/ __ \ / __ `__ \/ / / / /_ / / ___/ __ \ ' |
||||
echo '/ /_/ / / / / / / / / / / /_/ / / /_(__ ) / / / ' |
||||
echo '\____/_/ /_/ /_/ /_/ /_/\__, / /___/____/_/ /_/ ' |
||||
echo ' /____/' |
||||
echo "Hooray! Oh My Zsh has been updated and/or is at the current version. \nAny new updates will be reflected when you start your next terminal session." |
||||
echo "To keep up on the latest, be sure to follow Oh My Zsh on twitter: http://twitter.com/ohmyzsh" |
||||
echo "\033[0;32m"' __ __ '"\033[0m" |
||||
echo "\033[0;32m"' ____ / /_ ____ ___ __ __ ____ _____/ /_ '"\033[0m" |
||||
echo "\033[0;32m"' / __ \/ __ \ / __ `__ \/ / / / /_ / / ___/ __ \ '"\033[0m" |
||||
echo "\033[0;32m"'/ /_/ / / / / / / / / / / /_/ / / /_(__ ) / / / '"\033[0m" |
||||
echo "\033[0;32m"'\____/_/ /_/ /_/ /_/ /_/\__, / /___/____/_/ /_/ '"\033[0m" |
||||
echo "\033[0;32m"' /____/ '"\033[0m" |
||||
echo "\033[0;34mHooray! Oh My Zsh has been updated and/or is at the current version.\033[0m" |
||||
echo "\033[0;34mTo keep up on the latest, be sure to follow Oh My Zsh on twitter: \033[1mhttp://twitter.com/ohmyzsh\033[0m" |
||||
cd $current_path |
||||
Loading…
Reference in new issue