-
Notifications
You must be signed in to change notification settings - Fork 4
/
.zshrc
81 lines (65 loc) · 1.78 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
76
77
78
79
80
81
set -a
PROMPT='%* %? %m%# '
WORDCHARS="*?[]~=&;!#$%^(){}<>"
HISTSIZE=700000
SAVEHIST=500000
HISTFILE=~/.zhistory
function h () {history -f -2000 | grep "$@" | tail -n 5;}
alias ll='ls -l'
alias s='git status'
alias b='git branch -v'
alias ba='git branch -av'
alias grunt='grunt --no-color'
alias firefox="TZ=America/Los_Angeles open /Applications/Firefox.app"
alias slack="TZ=America/Los_Angeles open /Applications/Slack.app"
alias book='(cd ~/langmartin/mkelixir/Book && JAVA_HOME=/opt/homebrew/opt/openjdk@11 rake book.pdf && open book.pdf)'
ulimit -n 12288
setopt HIST_EXPIRE_DUPS_FIRST
setopt HIST_IGNORE_DUPS
setopt INC_APPEND_HISTORY_TIME
setopt HIST_REDUCE_BLANKS
# [ "$TERM" = dumb ] && unsetopt zle
dockerize () {
eval `docker-machine env default`
}
AnyBarHost=localhost
# AnyBarHost=10.199.0.1
anybar () {
[ -n "$1" ] && c="$1" || c=white
echo -n "$c" | nc -4u -w0 $AnyBarHost ${2:-1738}
}
make () {
anybar
env make $@ && anybar green || anybar red
}
fs () {
awk "{print \$$1;}"
}
function jwt() {
jq -R 'split(".") | .[1] | @base64d | fromjson' <<< "$1"
}
netstat-lpn () {
sudo lsof -nP -iTCP -sTCP:LISTEN
}
alias nocolor='echo "\e[0m"'
for inc in \
~/.opam/opam-init/init.zsh \
/usr/local/opt/asdf/asdf.sh \
/opt/homebrew/opt/asdf/libexec/asdf.sh \
~/.secret/sh \
; do
. "$inc" > /dev/null 2> /dev/null || true
done
setopt prompt_subst
git-current-branch () {
v=`git rev-parse --abbrev-ref HEAD 2>/dev/null` && echo "$v "
}
PROMPT='$(git-current-branch)'"$PROMPT"
if [ -x /usr/local/bin/kubectx ]; then
kubectx-current () {
v=`/usr/local/bin/kubectx -c 2>/dev/null` && echo "$v "
}
PROMPT='$(kubectx-current)'"$PROMPT"
fi
export NVM_DIR="$HOME/.nvm"
[ -s "/usr/local/opt/nvm/nvm.sh" ] && \. "/usr/local/opt/nvm/nvm.sh"