summaryrefslogtreecommitdiffstats
path: root/zshrc
blob: 4bb4a0f58b1c8d75e31d9ff0064d87391cbac34b (plain) (blame)
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
autoload -U promptinit
promptinit
prompt adam2 gray yellow green white
RPS1='[%*]'

# uses completion cache
zstyle ':completion::complete:*' use-cache 1

HISTFILE=$HOME/.history
HISTSIZE=100000
SAVEHIST=100000
setopt extended_history
setopt share_history
setopt hist_ignore_space

setopt correctall
setopt nobeep
setopt auto_cd
setopt multios
setopt extended_glob
setopt nullglob
setopt list_ambiguous
setopt no_nomatch
setopt interactivecomments # Allow comments even in the interactive shell
setopt listpacked # column width isn't constant

# Bindkeys {{{
bindkey -v                       # Use vim bindings
bindkey "^A" beginning-of-line   # Like in bash, for memory
bindkey "^E" end-of-line         # Like in bash
bindkey "^N" accept-and-infer-next-history # Enter; pop next history event
bindkey "^O" push-line           # Pushes line to buffer stack
bindkey "^P" get-line            # Pops top of buffer stack
bindkey "^R" history-incremental-search-backward # Like in bash, but should !
bindkey "^T" transpose-chars     # Transposes adjacent chars
bindkey "^Z" accept-and-hold     # Enter and push line
bindkey " " magic-space          # Expands from hist (!vim )
bindkey "^\\" pound-insert       # As an alternative to ctrl-c; will go in hist
bindkey "\e[3~" delete-char      # Enable delete
# }}}

alias mkdir='nocorrect mkdir'
alias mv='nocorrect mv'
alias cp='nocorrect cp'

# the default utilities are so laaaame
alias man="man -P vimmanpager"
#alias top="htop"

# colorify utilities
alias ls='ls -G'
alias ll='ls -lhA'
alias ack='ack --color'
# see also ~/.zshenv

# services
alias nao="(TERM='rxvt'; telnet nethack.alt.org)"
alias cao="telnet crawl.akrasiac.org"
alias termcast="telnet noway.ratry.ru 37331"
alias sporkhack='telnet nethack.nineball.org'

# shell accounts
alias katron="ssh katron.org"
alias dk="ssh darcs.katron.org"
alias arcane="ssh 66.41.105.165"
alias jsn="ssh noway.ratry.ru"
alias akrasiac="ssh henzell@crawl.akrasiac.org"
alias diesel="ssh diesel.bestpractical.com"
alias rax="ssh sartak.org"
alias home='ssh $HOMEIP'

# shortcuts
alias tdA="todo -f children"
alias dwn="darcs whatsnew"
alias emacs="emacs -nw"
alias darcsify="darcs init && darcs add \$(darcs whatsnew -ls | awk '/^a\ / {print \$2}') && darcs record -a -m'Initial import'"
alias dpl="darcs pull"
alias dps="darcs push"
alias dp="darcs pull && darcs push"
alias dr="darcs record"
alias dar="darcs amend-record"
alias db="darcs revert"
alias dqm="darcs query manifest"
alias starcraft="cd /home/sartak/.wine/drive_c/Program\ Files/Starcraft && sudo wine StarCraft.exe"
alias rtp='PERL5LIB=/opt/rt3/local/lib:/opt/rt3/lib:$PERL5LIB RT_DBA_USER=postgres RT_DBA_PASSWORD='' sudo prove -l -I/opt/rt3/local/lib'
alias rtpv='PERL5LIB=/opt/rt3/local/lib:/opt/rt3/lib:$PERL5LIB RT_DBA_USER=postgres RT_DBA_PASSWORD='' sudo perl -Ilib -I/opt/rt3/local/lib'
alias grtp='PERL5LIB=/opt/rt3/local/lib:/opt/rt3/lib:$PERL5LIB RT_DBA_USER=postgres RT_DBA_PASSWORD='' sudo g prove -l -I/opt/rt3/local/lib'
alias grmt='PERL5LIB=/opt/rt3/local/lib:/opt/rt3/lib:$PERL5LIB RT_DBA_USER=postgres RT_DBA_PASSWORD='' sudo g make test'
alias i='sudo apt-get install'
alias ci='sudo cpan -i'
alias unrt="ps aux -ww | grep standalone | sudo perl -lane 'system(qq{kill \$F[1]})'"
alias rert="unrt && sudo make start-httpd"

# global shortcuts
alias -g L='|less'
alias -g G='|egrep'
alias -g H='|head'
alias -g T='|tail'
alias -g W='|wc'
alias -g '...'='../..'
alias -g '....'='../../..'
alias -g '.....'='../../../..'
alias -g '......'='../../../../..'

fortune.pl