-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.zshrc
More file actions
71 lines (57 loc) · 2.38 KB
/
Copy path.zshrc
File metadata and controls
71 lines (57 loc) · 2.38 KB
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
DISABLE_AUTO_UPDATE="true"
# DISABLE_AUTO_TITLE="true"
COMPLETION_WAITING_DOTS="true"
DISABLE_UNTRACKED_FILES_DIRTY="true"
VI_MODE_SET_CURSOR="true"
VI_MODE_RESET_PROMPT_ON_MODE_CHANGE="true"
if [ -f ~/.zshrc.local-pre ]; then
source ~/.zshrc.local-pre
fi
if [ -f ~/.zgen/zgen.zsh ]; then
source ~/.zgen/zgen.zsh
if ! zgen saved; then
zgen oh-my-zsh
zgen oh-my-zsh plugins/vi-mode
zgen load zsh-users/zsh-syntax-highlighting
zgen load ~/.oh-my-zsh.cust/themes/mhoward
zgen save
fi
fi
add-zsh-hook -d precmd omz_termsupport_cwd
printf "\033]7;file://${HOME}\033\\"
KEYTIMEOUT=25
HISTORY_IGNORE="ls|cd|cd {-,..}|pwd|exit|date|privim*|cht.sh*"
REPORTTIME=5
REPORTMEM=100000
TIMEFMT="[%U user %S system %P cpu %*E total | max RSS %M kb] %J"
setopt correct
setopt hist_reduce_blanks
setopt hist_save_no_dups
setopt interactive_comments
setopt list_packed
setopt transient_rprompt
fpath=(~/.lib/zsh/ $fpath)
# Make zsh know about hosts already accessed by SSH
zstyle -e ':completion:*:(ssh|scp|sftp|rsh|rsync):hosts' hosts 'reply=(${=${${(f)"$(cat {/etc/ssh_,~/.ssh/known_}hosts(|2)(N) /dev/null)"}%%[# ]*}//,/ })'
# Altered from what's shown on Arch wiki
[[ -n "${terminfo[khome]}" ]] && bindkey -- "${terminfo[khome]}" beginning-of-line
[[ -n "${terminfo[kend]}" ]] && bindkey -- "${terminfo[kend]}" end-of-line
[[ -n "${terminfo[kich1]}" ]] && bindkey -- "${terminfo[kich1]}" overwrite-mode
[[ -n "${terminfo[kbs]}" ]] && bindkey -- "${terminfo[kbs]}" backward-delete-char
[[ -n "${terminfo[kdch1]}" ]] && bindkey -- "${terminfo[kdch1]}" delete-char
[[ -n "${terminfo[kcuu1]}" ]] && bindkey -- "${terminfo[kcuu1]}" up-line-or-beginning-search
[[ -n "${terminfo[kcud1]}" ]] && bindkey -- "${terminfo[kcud1]}" down-line-or-beginning-search
[[ -n "${terminfo[kcub1]}" ]] && bindkey -- "${terminfo[kcub1]}" backward-char
[[ -n "${terminfo[kcuf1]}" ]] && bindkey -- "${terminfo[kcuf1]}" forward-char
[[ -n "${terminfo[kpp]}" ]] && bindkey -- "${terminfo[kpp]}" beginning-of-buffer-or-history
[[ -n "${terminfo[knp]}" ]] && bindkey -- "${terminfo[knp]}" end-of-buffer-or-history
[[ -n "${terminfo[kcbt]}" ]] && bindkey -- "${terminfo[kcbt]}" reverse-menu-complete
source ~/.profile.common
# moved out of common bc =() is zsh only
function vg() {
$EDITOR -q =(ag --vimgrep ${@:?No pattern provided.}) +copen
}
if [ -f ~/.zshrc.local ]; then
source ~/.zshrc.local
fi
path[1,0]=(~/bin)