forked from Donearm/configs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshrc
48 lines (41 loc) · 1.1 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
HISTFILE=~/.histfile
HISTSIZE=5000
SAVEHIST=3000
setopt HIST_IGNORE_DUPS
unsetopt beep
setopt nohashdirs # rehash automatically new executables in $PATH
bindkey -v
zstyle :compinstall filename '/home/gianluca/.zshrc'
autoload -Uz compinit promptinit
compinit
promptinit
# Set prompt
prompt clint
typeset -U path
path=(/usr/local/bin /opt/android-sdk/platform-tools/ /usr/lib/go/site/bin/ ~/.go/bin/ $path)
# Some aliases
alias vi="vim"
alias ll="ls -asl -F -T 0 -b -H -1 --color=always"
alias l="ls - CF"
alias less="less -r"
alias cp="cp -p"
alias df="df -T"
alias du="du -h -c"
alias grep="grep --color"
alias orphans="pacman -Qtdq"
alias expliciti="pacman -Qetq"
# and autocomplete them
setopt completealiases
# Dirstack
DIRSTACKFILE="$HOME/.cache/zsh/dirs"
DIRSTACKSIZE=20
if [[ -f $DIRSTACKFILE ]] && [[ $#dirstack -eq 0 ]]; then
dirstack=( ${(f)"$(< $DIRSTACKFILE)"} )
[[ -d $dirstack[1] ]] && cd $dirstack[1]
fi
chpwd() {
print -l $PWD ${(u)dirstack} >$DIRSTACKFILE
}
setopt autopushd pushdsilent pushdtohome
setopt pushdignoredups # ignore duplicate entries
setopt pushdminus # this reverts the +/- operators