-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathzshrc
84 lines (67 loc) · 2.03 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
82
83
84
# alnyan's zsh config
# based on zephyx86's zsh config
# (which in turn was based on oh-my-zsh and arch-anywhere)
HISTFILE=${HOME}/.zsh_history
HISTSIZE=3000
SAVEHIST=3000
WORDCHARS=${WORDCHARS/\//}
HOSTNAME="$(hostname)"
source "${HOME}/.zsh/zsh-history-substring-search.zsh"
setopt INC_APPEND_HISTORY SHARE_HISTORY
setopt APPEND_HISTORY
unsetopt BG_NICE
setopt EXTENDED_HISTORY
setopt ALL_EXPORT
setopt notify globdots pushdtohome autolist #cdablevars
setopt autocd pushdsilent noautopushd extendedglob
unsetopt bgnice
autoload -U history-search-cmd
zmodload -a zsh/stat stat
zmodload -a zsh/zpty zpty
zmodload -a zsh/zprof zprof
autoload colors zsh/terminfo
bindkey "${terminfo[kcuu1]}" history-substring-search-up
bindkey "${terminfo[cuu1]}" history-substring-search-up
bindkey "${terminfo[kcud1]}" history-substring-search-down
bindkey "${terminfo[cud1]}" history-substring-search-down
bindkey "^[[H" beginning-of-line
bindkey "^[[F" end-of-line
# bindkey "^[[P" delete-char
bindkey "^[[3~" delete-char
bindkey "^[[1;5D" backward-word
bindkey "^[[1;5C" forward-word
autoload -Uz compinit
compinit
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
zstyle ':completion:*::::' completer _expand _complete _ignored
# Aliases
alias ls="ls --color -lh --group-directories-first"
alias ll=ls
alias l=ls
alias la="ls -a"
alias x="xclip -selection clipboard"
alias ":q"=exit
alias grep="grep --color"
# Git aliases
alias gcm="git commit"
alias gp="git push"
alias gup="git pull --rebase"
alias gd="git diff"
alias glog="git log"
alias gds="git describe --always --tags --dirty"
alias gst="git status"
alias gaa="git add -A"
alias mutt="date +%s>~/.mutt_check; mutt"
alias rsync="rsync --info=progress2"
alias pjs="python -m json.tool"
alias sarge="doas emerge -a --quiet-build"
alias mc="/usr/bin/mc -u"
alias mpmp="pidof mpd || mpd && ncmpcpp"
export KEYTIMEOUT=1
export EDITOR=nvim
export VISUAL=nvim
export PROMPT="%F{13}%n%f@%F{14}%M%f %F{11}%~%f %# "
export PATH=$HOME/.cargo/bin:$HOME/.local/bin:$PATH
if [ -d ~/.cargo/env ]; then
source ~/.cargo/env
fi