-
Notifications
You must be signed in to change notification settings - Fork 0
/
zshrc
62 lines (55 loc) · 1.96 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
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
# Lines configured by zsh-newuser-install
# End of lines configured by zsh-newuser-install
# The following lines were added by compinstall
#zstyle :compinstall filename '/home/ensc/.zshrc'
#
zmodload zsh/complist
autoload -U colors && colors
autoload -Uz compinit
compinit
autoload bashcompinit
bashcompinit
# End of lines added by compinstall
# Pre-set programs
#----- Common environment variables ------------------------------------------
export EDITOR="vim"
export TABSIZE=2
export LC_ALL="en_US.UTF-8"
#----- common functions listing ----------------------------------------------
for file in `ls $HOME/.zsh/` ; do
source $HOME/.zsh/$file
done
#----- Common alias list ------------------------------------------------------
alias ln='ln --symbolic --force'
alias ls='ls --group-directories-first -X --human-readable --color=auto'
alias grp='grep --colour=always'
alias ping='ping -c 7 -i 0.200'
alias ping-test='ping www.google.com'
alias rm='rm -i'
alias visudo='EDITOR=vim visudo'
alias size='du --max-depth=1 --human-readable --all'
alias less='less --raw-control-chars'
alias root='root -l'
alias wget='wget --continue'
alias Make='make clean && make'
alias astyle='astyle --suffix=none'
alias tmux="TERM=screen-256color-bce tmux"
alias ssh='ssh -Y'
alias less='less -R'
#----- Prompt design ---------------------------------------------------------
PROMPT=$(print "\
\n\
%F{white}┌─ %f%F{yellow}%n %f%F{red}@ %m %f%F{cyan}| %~ %f%F{white}[%D{%y/%m/%f} %D{%L:%M:%S}]%f\n\
%F{white}└───╼ %f%{$reset_color%} "\
)
#----- Time Command formatting -------------------------------------------------
TIMEFMT='[%J]'$'\n'\
'%U user %S system %P cpu %*E total'$'\n'\
'avg shared (code): %X KB'$'\n'\
'avg unshared (data/stack): %D KB'$'\n'\
'total (sum): %K KB'$'\n'\
'max memory: %M MB'$'\n'\
'page faults from disk: %F'$'\n'\
'other page faults: %R'