-
Notifications
You must be signed in to change notification settings - Fork 0
/
zshrc.local
90 lines (69 loc) · 2.52 KB
/
zshrc.local
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
export GPG_TTY=$(tty)
if type brew &>/dev/null; then
FPATH=$(brew --prefix)/share/zsh/site-functions:$FPATH
# SEE: https://gist.github.com/ctechols/ca1035271ad134841284
# On slow systems, checking the cached .zcompdump file to see if it must be
# regenerated adds a noticable delay to zsh startup. This little hack restricts
# it to once a day. It should be pasted into your own completion file.
#
# The globbing is a little complicated here:
# - '#q' is an explicit glob qualifier that makes globbing work within zsh's [[ ]] construct.
# - 'N' makes the glob pattern evaluate to nothing when it doesn't match (rather than throw a globbing error)
# - '.' matches "regular files"
# - 'mh+24' matches files (or directories or whatever) that are older than 24 hours.
autoload -Uz compinit
if [[ -n ${ZDOTDIR}/.zcompdump(#qN.mh+24) ]]; then
compinit;
touch .zcompdump;
echo "HELLO"
else
compinit -C;
fi;
fi
source ~/dotfiles-local/antigen.zsh
# Load the oh-my-zsh's library.
antigen use oh-my-zsh
# Speedup shell startup time by lazy loading NVM (requires zsh-nvm plugin)
export NVM_LAZY_LOAD=true
export NVM_COMPLETION=true
antigen bundle lukechilds/zsh-nvm
antigen bundle git
antigen bundle command-not-found
antigen bundle tmux
# Syntax highlighting bundle.
antigen bundle zsh-users/zsh-syntax-highlighting
# Load the theme.
antigen theme denysdovhan/spaceship-prompt
# Tell Antigen that you're done.
antigen apply
# Let's live in tmux
_not_inside_tmux() { [[ -z "$TMUX" ]] }
ensure_tmux_is_running() {
if _not_inside_tmux; then
tat
fi
}
ensure_tmux_is_running
# Profiling utilities
timezsh() {
shell=${1-$SHELL}
for i in $(seq 1 10); do /usr/bin/time $shell -i -c exit; done
}
# fzf functions
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
# homebrew python no longer shadows the system copy of python this
# effectively sets the `python` command to the homebrew version
export PATH="/usr/local/opt/python/libexec/bin:$PATH"
# set up arduino-mk paths
export ARDUINO_DIR=/Applications/Arduino.app/Contents/Java
export ARDMK_DIR=/usr/local/opt/arduino-mk
# shortcut to get back to root of a project
alias grt='cd $(git root)'
# paths for pipx
export PATH="/Users/neiljohari/.local/bin:$PATH"
export PATH="/Users/neiljohari/Library/Python/3.7/bin:$PATH"
# path for postgres bins
export PATH="/Applications/Postgres.app/Contents/Versions/latest/bin:$PATH"
typeset -g ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE='20'
# Add RVM to PATH; ensure it is last PATH variable change
export PATH="$PATH:$HOME/.rvm/bin"