-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path_zshrc
executable file
·75 lines (66 loc) · 2.29 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
70
71
72
73
74
75
#!/bin/zsh
# Set my theme. Muse is one I like because they have icons, git support, and
# muse seems to work without additional configuration / support.
# Themes I like: random, agnoster (colors), bureau (symbols), clean, lukerandall, nanotech, smt (time), sorin (simple/symbols)
export ZSH_THEME="morin"
# I like to use the vim editor
export EDITOR='emacs'
# Tell zsh to auto-select the first completion when there is only one
zstyle '*' single-ignored complete
# Load these plugins when zsh starts (it will start AFTER this config is processed
plugins=(brew dircycle gem git autoenv thefuck)
# Tell zsh to show red dots while searching for a completion
COMPLETION_WAITING_DOTS="true"
# Make zsh autoupdate, but don't ask for confirmation
DISABLE_UPDATE_PROMPT=true
# Set the directory for ZSH customizations
export ZSH_CUSTOM=$HOME/Settings/zsh
# Disable autocorrect
unsetopt correct_all
export DISABLE_CORRECTION="true"
# Enable more brace expansion
setopt braceccl
#
# OSX Settings
#
if expr "$OSTYPE" : darwin >/dev/null ; then
# Open the TotalTerminal app
# open -a TotalTerminal 2>/dev/null
# Setup homebrew
export PATH=/usr/local/bin:$PATH
# Homebrew uses a GitHub API token
export HOMEBREW_GITHUB_API_TOKEN=$(cat ~/.ssh/GITHUB_API_TOKEN)
# Setup a trash function
trash() {
CYAN="\x1B[36m"
RED="\x1B[31m"
RESET="\x1B[0m"
for file in $@ ; do
# Normalize the path
file=$(cd $(dirname $file); pwd)/$(basename $file)
# If the file is found, then delete. Otherwise error
if [[ -e "$file" ]] ; then
echo -e "Removing file ${CYAN}${file}${RESET}"
/usr/bin/env osascript -e "tell application \"Finder\" to delete POSIX file \"${file}\"" 1>/dev/null
else
echo -e "${RED}Cannot find the file ${CYAN}${file}${RESET}"
fi
done
}
fi
# Run RVM init
if [[ -s "$HOME/.rvm/scripts/rvm" ]] ; then
. "$HOME/.rvm/scripts/rvm" # This loads RVM into a shell session.
PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting
fi
# Docker ENV
hash docker-machine 2>/dev/null && . =(docker-machine env default)
# Add my personal bin set
PATH=/usr/local/sbin:$PATH:~/usr/bin
# Configure Byobu
export BYOBU_PREFIX=$(brew --prefix)
# Support go
[[ -f /usr/local/opt/libexec/bin/go ]] && export PATH=$PATH:/usr/local/opt/go/libexec/bin
export GOPATH=$HOME/go
export PATH=$PATH:$HOME/go/bin
# vim: set ft=zsh :