-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshrc
80 lines (67 loc) · 2.01 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
export PATH=~/.local/bin:$PATH
APP_DIR="/usr/share"
PLUGINS_DIR="${APP_DIR}/zsh/plugins"
export EDITOR=vi
KEYTIMEOUT=1
if ! pgrep -u "$USER" ssh-agent > /dev/null; then
ssh-agent -t 1h > "$XDG_RUNTIME_DIR/ssh-agent.env"
fi
if [[ ! -f "$SSH_AUTH_SOCK" ]]; then
source "$XDG_RUNTIME_DIR/ssh-agent.env" >/dev/null
fi
# colors
zstyle ':completion:*' list-colors ''
# cool stuff to have
setopt AUTOCD
# save history pleeeease
setopt APPEND_HISTORY
setopt SHARE_HISTORY
HISTFILE=~/.zsh_history
SAVEHIST=9999
HISTSIZE=10000
setopt HIST_EXPIRE_DUPS_FIRST
setopt EXTENDED_HISTORY
# fixing some keybindings bug in zsh
bindkey "\e[1~" beginning-of-line
bindkey "\e[4~" end-of-line
bindkey "\e[5~" beginning-of-history
bindkey "\e[6~" end-of-history
bindkey "\e[3~" delete-char
bindkey "\e[2~" quoted-insert
bindkey "\e[5C" forward-word
bindkey "\eOc" emacs-forward-word
bindkey "\e[5D" backward-word
bindkey "\eOd" emacs-backward-word
bindkey "\ee[C" forward-word
bindkey "\ee[D" backward-word
# completions
autoload -U compinit; compinit
# plugins
source "${PLUGINS_DIR}/zsh-vi-mode/zsh-vi-mode.plugin.zsh"
source "${PLUGINS_DIR}/zsh-syntax-highlighting/zsh-syntax-highlighting.plugin.zsh"
source "${PLUGINS_DIR}/zsh-autosuggestions/zsh-autosuggestions.plugin.zsh"
source "/usr/share/fzf/completion.zsh"
source "/usr/share/fzf/key-bindings.zsh"
# aliases
alias vim="nvim"
# alias code="foot --override=pad=0x0 nvim & disown && exit"
alias code="wezterm -e nvim & disown && exit"
alias ls="lsd"
alias lss="lsd --tree --depth=2 -a -I .git -I .github"
alias k="kubectl"
alias gst="git status"
alias gss="git status --short"
alias ga.="git add . && git status --short"
alias ga..="git add ../ && git status --short"
alias gau="git add -u"
alias gcm="git commit -m"
alias gcma="git commit --amend -m"
alias gco="git checkout"
alias gpl="git pull"
alias gplr="git pull --rebase"
alias gplrc="git rebase --continue"
alias gps="git push"
alias gpsuo="git push --set-upstream origin"
alias gff="git diff"
# prompt
source "$HOME/.config/zsh/purs_setup"