-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshrc
77 lines (65 loc) · 1.74 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
# ~/.zshrc
# Original:
# $Id: zshrc 144 2012-04-19 23:01:12Z gnitset $
#source ~/.zshrc_lib
setopt NO_CLOBBER
setopt NO_PROMPT_CR
setopt NO_BEEP
setopt AUTO_MENU
setopt COMPLETE_IN_WORD
setopt EXTENDED_GLOB
setopt AUTOCD
setopt INTERACTIVE_COMMENTS
setopt APPEND_HISTORY
setopt HIST_IGNORE_DUPS
setopt HIST_IGNORE_ALL_DUPS
setopt HIST_IGNORE_SPACE
setopt SHARE_HISTORY
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}' 'm:{a-zA-Z}={A-Za-z}'
zstyle ':completion::complete:*' use-cache 1
zstyle ':completion:*:descriptions' format '%U%B%d%b%u'
zstyle ':completion:*:warnings' format '%BSorry, no matches for: %d%b'
zstyle ':completion:*' special-dirs true
bindkey '^a' beginning-of-line
bindkey '^e' end-of-line
bindkey '^r' history-incremental-search-backward
bindkey '^y' yank
bindkey '^t' delete-word
bindkey '^x' copy-prev-shell-word
bindkey '^z' vi-undo-change
bindkey '\e.' insert-last-word
autoload -U compinit
compinit -d ~/.zcompdump.`hostname`
alias py=python3
update-configs() {
emulate -L zsh
git clone https://github.com/hagesjo/configs.git /tmp/tmpconfigs
rsync -a /tmp/tmpconfigs/.[^.(git)]* ~
rm -rf /tmp/tmpconfigs &&
zcompile ~/.zprofile 2> /dev/null
zcompile ~/.zshrc 2> /dev/null
zcompile ~/.zprofile.local 2> /dev/null
zcompile ~/.zshrc.local 2> /dev/null
}
precmd() {
if [ "$TERM" != "linux" ]; then
echo -ne "\033]0;${USER}@${HOST}: ${PWD}\007"
fi
}
if [ "$HAVE_RUN_ZPROFILE" != "Y" ]; then
. ~/.zprofile
fi
if [[ -f ~/.zshrc.local ]]; then
. ~/.zshrc.local
fi
alias ls='ls --color=auto'
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
alias se='setxkbmap se'
alias dv='setxkbmap dvorak se'
alias svim='sudo vim'
alias fuck='sudo \!\!'
alias grep='grep --color=always'
alias fgrep='find | grep'
alias 'gits'='git status'