-
Notifications
You must be signed in to change notification settings - Fork 0
/
.zshrc
70 lines (57 loc) · 1.38 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
# uncomment to debug speed issues
# zmodload zsh/zprof
# HELPERS
#-------------------
curl-resp-status() {
curl -s -o /dev/null -w "\n%{http_code}\n" $1
}
add_to_path() {
case ":$PATH:" in
*":$1:"*) :;; # already there
*) PATH="$1:$PATH";; # or PATH="$PATH:$1"
esac
}
# CONFIG
#-------------------
setopt histignorealldups
export EDITOR="hx"
export VISUAL="hx"
export HISTFILE=~/.zsh_history
export SAVEHIST=20000
export HISTSIZE=10000
# path config
export GOPATH=$HOME/go
export GOBIN=$GOPATH/bin
export NVM_DIR="$HOME/.nvm"
export FZF_DEFAULT_COMMAND="rg --files --hidden"
# ALIAS
#-------------------
alias ls="ls -aGhF"
alias ll="ls -alvF"
alias la="ll -A"
alias vi="nvim"
alias ev="hx ~/.config/nvim"
alias eb="hx ~/.zshrc"
alias ek="hx ~/.config/kitty/kitty.conf"
alias ex="hx ~/.config/helix/config.toml"
alias rb="exec zsh"
alias k="/usr/local/bin/kubectl"
alias json="python -mjson.tool"
alias nvm-start=". $NVM_DIR/nvm.sh"
alias rg="rg --hidden"
# PATH
# ------------------------------
add_to_path "$HOME/.local/bin"
add_to_path "$HOME/go/bin"
. "$HOME/.cargo/env"
. "/opt/homebrew/opt/asdf/libexec/asdf.sh"
# PROMPT
# ------------------------------
GIT_PS1_SHOWDIRTYSTATE=1
GIT_PS1_SHOWSTASHSTATE=1
GIT_PS1_SHOWUNTRACKEDFILES=1
GIT_PS1_SHOWCOLORHINTS=1
. ~/.local/bin/git-prompt.sh
precmd () { __git_ps1 "λ:" "%~ ❯ " "[%s] " }
# uncomment to debug speed issues
# zprof