6 # Former \!* using tcsh aliases have been converted to functions
11 # Aliases starting with special characters
15 -1 -2 -3 -4 -5 -6 -7 -8 -9 +0 +1 +2 +3 +4 +5 +6 +7 +8 +9() { pushd $0 }
19 alias ....='cd ../../..'
21 # One character aliases
25 alias g='fgrep --color=auto'
32 if [ -r /usr/share/autojump/autojump.sh ]; then
33 alias j > /dev/null && unalias j
34 . /usr/share/autojump/autojump.sh
37 # Two character aliases
38 alias eg='egrep --color=auto'
39 function ff() { find . -name "$@" }
40 alias gr='grep --color=auto'
45 if whence xd > /dev/null; then
46 function xd() { cd $(command xd "$@") }
48 function df() { command df -TP "$@" | column -t }
50 alias mx="nslookup -sil -q=mx"
51 alias ns="nslookup -sil -q=ns"
53 alias ls='ls -F --color=auto'
57 # In average two and a half character aliases ;-)
58 if whence wcd > /dev/null; then
66 # Three character aliases
67 alias acs='apt-cache show'
68 alias acp='apt-cache policy'
69 alias ac/='apt-cache search'
70 alias af/='apt-file search'
71 alias afs='apt-file search'
72 alias afl='apt-file list'
73 alias afu='apt-file update'
74 alias ag/='aptitude search'
75 alias agi='aptitude install'
76 alias ag+='aptitude install'
77 alias ag-='aptitude remove'
78 alias agr='aptitude remove'
79 alias ag_='aptitude purge'
80 alias agp='aptitude purge'
81 alias agu='aptitude update'
82 alias agh='aptitude hold'
83 alias agc='apt-get clean'
84 alias agw='aptitude why'
85 alias 'a-u'='aptitude -u'
86 alias asv='apt-show-versions'
87 function ffi() { find . -iname "$@" }
88 function lpr() { command lpr "$@"; lpq }
90 alias cls=clear # Yeah, that's from DOS
91 alias ino='inotail -f'
97 # Set the title to something more obvious, e.g. the expanded
99 print -Pn "\e]0;%n@%m: autossh -t $* 'screen -RdU'\a";
100 autossh -x -a -t "$@" 'screen -RdU'
104 # Four character aliases
106 # Set the title to something more obvious, e.g. the expanded
107 # alias, eh, function
108 print -Pn "\e]0;%n@%m: autossh $*\a";
113 fucntion http() { telnet $1 80 }
114 alias root='ssh root@localhost'
115 alias acss='apt-cache showsrc'
116 alias agsu='aptitude safe-upgrade'
117 alias agdu='aptitude full-upgrade'
118 alias agma='aptitude markauto'
119 alias agri='aptitude reinstall'
120 alias aguh='aptitude unhold'
121 alias agbd='aptitude build-dep'
122 alias agwn='aptitude why-not'
124 # Five character aliases
125 alias deurl='$HOME/bin/url_decode.pl'
126 function perlv() { perl -le "use $1; print "'$'"$1"'::VERSION;' }
127 alias acsrc='apt-cache showsrc'
128 alias aguma='aptitude unmarkauto'
130 if [ $# -eq 0 ]; then
131 command mount | column -t
138 alias mmv='noglob mmv'
139 alias wget='noglob wget'
140 alias find='noglob find'
141 alias clive='noglob clive'
142 alias clivescan='noglob clivescan'
143 alias translate='noglob translate'
144 alias links='noglob links'
145 alias links2='noglob links2'
146 alias xlinks2='noglob xlinks2'
147 alias lynx='noglob lynx'
152 # ls sorting (Idea from zsh book)
154 alias lssmall=ls -lhS
158 # grep with color by default
159 alias grep='grep --color=auto'
160 alias fgrep='fgrep --color=auto'
161 alias egrep='egrep --color=auto'
164 for i in sha512 sha256 sha1 md5; do
165 ssl-cert-$i() { openssl x509 -noout -fingerprint -$i -in $1 }
168 ssl-cert-fingerprints() {
169 for i in sha512 sha256 sha1 md5; do
175 openssl x509 -noout -text -in $1
176 ssl-cert-fingerprints $1
180 alias setvi='export EDITOR=vi VISUAL=vi'
181 alias setvim='export EDITOR=vim VISUAL=vim'
182 alias setzile='export EDITOR=zile VISUAL=zile'
183 alias setemacs='export EDITOR="emacsclient -a emacs" VISUAL="emacsclient -a emacs"'
184 #alias edit='$EDITOR'
185 alias vt100='export TERM=vt100'
188 #alias y='echo "Hallo, sind wir noch wach, oder sind wir wieder auf die Y-Taste gefallen? ;-)"'
197 ### Laden weiterer Aliasse
199 #alias xal='source ~/.Xalias'
201 #if ( -f $home/.alias.mtools ) then
202 # source $home/.alias.mtools
204 #if ( -f $home/.alias.wapua ) then
205 # source $home/.alias.wapua
209 # Idea from Sven's zsh Book (and yeah I overwrite the previous reload
210 # function which reloaded the zshrc.
211 start stop restart reload force-reload() {
212 sudo invoke-rc.d $1 $0
215 # From http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=299228
217 grep-dctrl -F Build-Depends "$1" -s Package /var/lib/apt/lists/*_Sources \