This repository has been archived by the owner on Mar 15, 2019. It is now read-only.
forked from abevoelker/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
zshrc
70 lines (58 loc) · 1.81 KB
/
zshrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# Just to force some apps to use color
export TERM=xterm-256color
export PATH=/home/abe/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
# Load scala interpreter
if [ -d "$HOME/scala-2.9.0.1/bin" ] ; then
PATH="$HOME/scala-2.9.0.1/bin:$PATH"
fi
# Path to your oh-my-zsh configuration.
export ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
export ZSH_THEME="abevoelker"
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
# Example format: plugins=(rails git textmate ruby lighthouse)
plugins=(git rails ruby)
source $ZSH/oh-my-zsh.sh
# Spell correction annoys me (I'm a decent speller)
unsetopt correct_all
# Global aliases (needn't start at beginning of line)
alias -g NUL="> /dev/null 2>&1"
alias -g ENUL="2> /dev/null"
# Aliases
alias f='find . -name'
alias fd='find . -type d -name'
alias ff='find . -type f -name'
alias gitk='gitk --all'
# By @ieure; copied from https://gist.github.com/1474072
#
# It finds a file, looking up through parent directories until it finds one.
# Use it like this:
#
# $ ls .tmux.conf
# ls: .tmux.conf: No such file or directory
#
# $ ls `up .tmux.conf`
# /Users/grb/.tmux.conf
#
# $ cat `up .tmux.conf`
# set -g default-terminal "screen-256color"
#
function up()
{
if [ "$1" != "" -a "$2" != "" ]; then
local DIR=$1
local TARGET=$2
elif [ "$1" ]; then
local DIR=$PWD
local TARGET=$1
fi
while [ ! -e $DIR/$TARGET -a $DIR != "/" ]; do
DIR=$(dirname $DIR)
done
test $DIR != "/" && echo $DIR/$TARGET
}
# Load RVM into a shell session *as a function*
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"