Created
August 5, 2013 03:48
-
-
Save kharmabum/6153368 to your computer and use it in GitHub Desktop.
zshrc profile
This file contains hidden or 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
# Path to your oh-my-zsh configuration. | |
ZSH=$HOME/.oh-my-zsh | |
ZSH_THEME="smt" | |
COMPLETION_WAITING_DOTS="true" | |
plugins=(git github osx sublime) | |
source $ZSH/oh-my-zsh.sh | |
unsetopt correct_all | |
export NODE_PATH=/usr/local/lib/node | |
export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/npm/bin:/opt/X11/bin:/usr/local/opt/ruby/bin | |
export EDITOR='subl' | |
alias zshconfig="subl ~/.zshrc" | |
alias zshboot="source ~/.zshrc" | |
alias ohmyzsh="subl ~/.oh-my-zsh" | |
alias ..="cd .." | |
alias cl="clear" | |
alias l="ls -CF" | |
alias l.="ls -d .*" | |
alias la="ls -A" | |
alias ll="ls -alrtF" | |
alias m="less" | |
alias md="mkdir" | |
alias rm="rm -i" | |
# GITHUB | |
GIT_AUTHOR_NAME="Juan-Carlos Foust" | |
GIT_COMMITTER_NAME="$GIT_AUTHOR_NAME" | |
git config --global user.name "$GIT_AUTHOR_NAME" | |
GIT_AUTHOR_EMAIL="[email protected]" | |
#GIT_AUTHOR_EMAIL="[email protected]" | |
GIT_COMMITTER_EMAIL="$GIT_AUTHOR_EMAIL" | |
git config --global user.email "$GIT_AUTHOR_EMAIL" | |
# AWS | |
# quickly open Xcode projects and workspaces | |
function xcode { | |
# get an array of .xcworkspace and .xcodeproj files | |
workspaces=(`ls -d1 *.(xcworkspace|xcodeproj) | sed -e "s/\///g"`) &> /dev/null | |
filenames=(`ls -d1 *.(xcworkspace|xcodeproj) | sed -e "s/\..*$//g"`) &> /dev/null | |
if [[ ${#workspaces} == 0 ]]; then | |
echo "No Xcode projects or workspaces were found." | |
return | |
fi | |
# if there's just one matching file, open it. | |
if [[ ${#workspaces} == 1 ]]; then | |
`open $workspaces[1] -a /Applications/Xcode.app` | |
return | |
fi | |
# if there's just and xcodeproj and xcworkspace with the same name, | |
# open the xcworkspace - it's probably a Cocoapods setup. | |
if [[ ${#workspaces} == 2 ]]; then | |
if [[ $filenames[1] == $filenames[2] ]]; then | |
`open $workspaces[2] -a /Applications/Xcode.app` | |
return | |
fi | |
fi | |
# present a list of projects/workspaces, de-duped by name | |
counter=1 | |
echo "Multiple choice currently isn't enabled. Available workspaces:" | |
for workspace in workspaces; do | |
echo "$counter. $workspace" | |
set counter += 1 | |
done | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment