-
Notifications
You must be signed in to change notification settings - Fork 0
/
.zshrc
66 lines (50 loc) · 1.59 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
# Use HEREDOC to Pass commands which should be loaded last
_POST_LOAD=""
_post_load() {
while IFS="\n" read -r read_heredoc_line; do
_POST_LOAD+="\n$read_heredoc_line"
done
}
# Path to my oh-my-zsh installation.
export ZSH=~/.oh-my-zsh
# Set name of the theme to load.
ZSH_THEME="robbyrussell"
# Red dots whilst waiting for completion.
COMPLETION_WAITING_DOTS="true"
# Custom ZSH plugins ~/.oh-my-zsh/custom/plugins/
plugins=(alias-tips)
# Oh My Zsh plugins
plugins+=(git common-aliases gem git-extras osx rails sprunge web-search docker docker-compose)
# Load Oh My Zsh
source $ZSH/oh-my-zsh.sh
# Remove unwanted aliases from plugins
unalias fd
unalias 'G'
# Aliases and custom function are located within ZSH_CUSTOM folder
# Prevent enter from producing ^M
stty sane
# Load fzf
source ~/.fzf.zsh
# Load standalone ZSH plugins
source "$HOMEBREW_PREFIX/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"
## Suggests commands as you type based on your commands history
source "$HOMEBREW_PREFIX/share/zsh-autosuggestions/zsh-autosuggestions.zsh"
# Load asdf version manager
# https://github.com/asdf-vm/asdf
. "$HOME/.asdf/asdf.sh"
. ~/.asdf/plugins/java/set-java-home.zsh
if [ $ITERM_SESSION_ID ]; then
# Load iTerm2 shell integration
source "${HOME}/.iterm2_shell_integration.zsh"
# Allow setting tab title from terminal in ITerm
DISABLE_AUTO_TITLE="true"
fi
# Set tab title to the current directory name after changing a directory
chpwd() {
setTabTitleFromContext
}
chpwd
# Load commands which were marked to be loaded last
while read -r i; do
eval "$i"
done < <(echo "$_POST_LOAD")