-
Notifications
You must be signed in to change notification settings - Fork 0
/
zshrc
88 lines (68 loc) · 2.04 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
78
79
80
81
82
83
84
85
86
87
88
########################################################################
#
# ToDo
#
# Set the special path var as a unique list
typeset -U path
path=( ~/bin/sys /usr/local/bin $path )
#
# Set window title
#
function precmd () { print -Pn "\e]0;[ %m ]:%~\a" }
#
# autoload
#
autoload -Uz compinit colors promptinit
compinit ; colors ; promptinit
# Set my default options
bindkey -e
export EDITOR="vim"
export VISUAL="vim"
export HISTFILE=~/.zshhistory
export HISTSIZE=20000
export SAVEHIST=20000
#setopt HIST_SAVE_NO_DUPS
setopt HIST_IGNORE_ALL_DUPS
setopt extendedglob
setopt INTERACTIVE_COMMENTS
setopt SHARE_HISTORY
setopt APPEND_HISTORY
unsetopt AUTO_REMOVE_SLASH
# My prompts
#PROMPT="[%n]@[%M]:%~%# "
#PROMPT="[%{$fg[blue]%}%n%{$reset_color%}]@[%M] [ %{$fg[magenta]%}%~%{$reset_color%} ] > "
#PROMPT="[%{$fg[blue]%}%n%{$reset_color%}]@[%M] [ %{$fg[magenta]%}%~%{$reset_color%} ]» "
#PROMPT="[%{$fg[blue]%}%n%{$reset_color%}]@[%M] [ %{$fg[magenta]%}%~%{$reset_color%} ]$prompt_newline» "
PROMPT="┌[%{$fg[blue]%}%n%{$reset_color%}]@[%M] [ %{$fg[magenta]%}%~%{$reset_color%} ]$prompt_newline└> "
#
# Remember to generate dircolors on the box w/ the colour scheme you want to
# use.
#
#
# GNU dircolors on a mac
#
#[[ -e dircolors ]] && eval $(dircolors --sh)
[[ -e gdircolors ]] && eval $(gdircolors --sh)
# Aliases
#
# Linux only
#
#alias cal="cal -3"
#alias ls="ls --color -F"
#
# Mac using GNU ls
#
alias ls="/usr/local/bin/gls --color -F"
alias less="less -i"
alias cdiff="colordiff"
alias datestamp.me='date +"%Y.%m.%d"'
alias datetimestamp.me='date +"%Y.%m.%d-%H:%M:%S"'
alias datestamp.utc='TZ="UTC" date'
alias datestamp.datetime='date +%Y.%m.%d_%H.%M.%S'
alias distupdate.me='sudo sh -c "apt-get clean ; apt-get update ; apt-get dist-upgrade" '
alias driftadjust.me='sudo sh -c "/etc/init.d/ntp stop ; /usr/sbin/ntpd -q -g ; /etc/init.d/ntp start" '
#
# Kludge for gnome terminal. It doesn't properly set the TERM var
# like most terminals. Therefore, I have to do this myself.
#
[[ $TERM == "xterm" ]] && TERM=gnome-256color