-
Notifications
You must be signed in to change notification settings - Fork 1
/
.zshrc
52 lines (42 loc) · 1.41 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
# checking .cache direcory for declutter home
CACHE="$HOME/.cache/zsh"
if [[ ! -d ~/.cache/zsh ]]; then
CACHE="$HOME"
fi
export LANG=en
export LC_ALL=en_US.UTF-8
export EDITOR="vim"
export HISTSIZE=2000
export SAVEHIST=2000
export HISTFILE="~/.cache/zsh/.zsh_history"
autoload -U colors zcalc compinit
colors
compinit -d "$CACHE/.zcompdump"
setopt AUTO_CD # why would you type 'cd dir' if you could just type 'dir'?
setopt CORRECT # Spell check commands! (Sometimes annoying)
setopt PUSHD_TO_HOME # blank pushd goes to home
setopt NUMERIC_GLOB_SORT # sort by numeric method
setopt GLOB_COMPLETE # completion in scp ex.
# history
setopt APPEND_HISTORY
setopt SHARE_HISTORY
setopt HIST_IGNORE_ALL_DUPS
setopt HIST_IGNORE_SPACE
setopt HIST_REDUCE_BLANKS
bindkey "^[[1~" beginning-of-line # fn-left
bindkey "^[[4~" end-of-line # fn-right
bindkey "^[[1;5C" forward-word # ctrl-left
bindkey "^[[1;5D" backward-word # ctrl-right
# env if exist
if [[ -r ~/.zshenv ]]; then
source ~/.zshenv
fi
# tmux autostart
if [ -z $TMUX ]; then;
tmux attach || tmux new;
fi
source ~/.zsh/autocomplete.zsh
source ~/.zsh/aliases.zsh
source ~/.zsh/functions.zsh
source ~/.zsh/git-prompt/git-prompt.zsh
PROMPT='%B[%b%F{cyan}%W%f %F{cyan}%*%f%B] %b%{$fg[green]%}%n%{$reset_color%}@%{$fg[yellow]%}%m%{$reset_color%}:%{$fg_bold[white]%}%~%{$reset_color%}$(git_super_status)$ '