-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshrc
41 lines (31 loc) · 985 Bytes
/
.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
# Export PATH
PATH="$PATH:/opt/homebrew/bin:$HOME/.docker/bin"
# homebrew autocomplete
if type brew &>/dev/null
then
FPATH="$(brew --prefix)/share/zsh/site-functions:${FPATH}"
autoload -Uz compinit
compinit
fi
# tmux
[[ -z "$TMUX" && -z "$INTELLIJ_ENVIRONMENT_READER" ]] && exec tmux new-session -A -s default
# alias
alias ls='ls -lh --color=auto'
alias dir='dir --color=auto'
alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
# public ip
alias pubip="dig +short TXT o-o.myaddr.l.google.com @ns1.google.com | tr -d '\"'"
# Save type history for completion and easier life
HISTFILE=~/.zsh_history
HISTSIZE=10000
SAVEHIST=10000
setopt appendhistory
# switch between arm and x64
alias arm="exec env /usr/bin/arch -arm64 /bin/zsh --login"
alias intel="exec env /usr/bin/arch -x86_64 /bin/zsh --login"
# start Starship
export STARSHIP_CONFIG=~/.dotfile/starship.toml
eval "$(starship init zsh)"