-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathzshrc
52 lines (40 loc) · 1.31 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
# Executes commands at the start of an interactive session.
# Ensure Antigen is installed
if [[ ! -f "$ANTIGENZSH" ]]; then
git clone https://github.com/zsh-users/antigen.git "$ADOTDIR"
fi
# Load Antigen
source "$ANTIGENZSH"
antigen init $ANTIGENRC
# Enable autocorrection of commands and args
setopt correct
setopt correct_all
# Set theme
autoload -Uz promptinit
promptinit
prompt steeef
# Set path to synced dotfiles for status check
export LOCAL_DOTFILES_REPOSITORY="$HOME/.dotfiles"
# Path to dotstat script
dotstatPath="$HOME/.updot/dotstat.sh"
# Ensure script is available, and get it if not
if [ ! -f $dotstatPath ]; then
echo "Downloading dotstat.sh..."
curl https://gist.githubusercontent.com/ntpeters/bb100b43340d9bf8ac48/raw/dotstat.sh -o $dotstatPath --create-dirs --progress-bar
echo
fi
# Ensure script is executable
if [ ! -x $dotstatPath ]; then
chmod a+x $dotstatPath
fi
# Aliases¬
alias zshconfig="vim $HOME/.zshrc"
alias py="python"
alias railserv="rails server -b $IP -p $PORT"
# What's up with my dotfiles?
alias updot="python ~/.updot/updot.py"
alias dotstat="bash $dotstatPath"
# Prevent terminal from capturing Ctrl+S so Vim can assign it
alias vim="stty stop '' -ixoff ; vim"
ttyctl -f
test -e "${HOME}/.iterm2_shell_integration.zsh" && source "${HOME}/.iterm2_shell_integration.zsh"