summaryrefslogtreecommitdiff
path: root/zshrc
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2009-05-08 18:44:50 +0000
committerweasel <weasel@bc3d92e2-beff-0310-a7cd-cc87d7ac0ede>2009-05-08 18:44:50 +0000
commit8c03db017327484cc109990d717af4f5408154cc (patch)
tree2cb205a3027dc70d38d9fe726721ce6286693307 /zshrc
parent13fda888ee143406158149a48b57a66f96dbea35 (diff)
Clean up zshrc
git-svn-id: svn+ssh://asteria.noreply.org/svn/weaselutils/trunk@386 bc3d92e2-beff-0310-a7cd-cc87d7ac0ede
Diffstat (limited to 'zshrc')
-rw-r--r--zshrc131
1 files changed, 32 insertions, 99 deletions
diff --git a/zshrc b/zshrc
index 0917241..4c33fe1 100644
--- a/zshrc
+++ b/zshrc
@@ -3,10 +3,6 @@
if [ -e /etc/zsh/zshenv ]; then
. /etc/zsh/zshenv
fi
-# fink on OS X
-if [ -e /sw/bin/init.sh ]; then
- . /sw/bin/init.sh
-fi
HOSTNAME="`hostname`"
SYSTEM="`uname -s`"
@@ -62,33 +58,28 @@ esac
## Set options
-setopt extendedglob # required for some of our completion magic
-setopt list_types # Put a file type indicator after file names when
- # completing.
-#setopt correct # Attempt spelling correction on command names only.
-setopt nocorrect
-#setopt print_exit_value
-setopt list_ambiguous
-setopt bash_auto_list # Make <tab><tab> do the right thing.
-setopt list_packed # Compacter display of completion list.
-setopt interactive_comments
-setopt nohup # So backgrounded jobs don't get terminated when
- # the shell is.
-setopt autocd # make '..' cd into .., and '../projects' cd there etc.
-#unsetopt CHECK_JOBS
-setopt CHECK_JOBS
-unsetopt BG_NICE
-
-export HISTFILE=~/.zsh_history
-export HISTSIZE=50000
-export SAVEHIST=50000
-setopt APPEND_HISTORY
-setopt INC_APPEND_HISTORY
-#setopt SHARE_HISTORY
-setopt HIST_IGNORE_DUPS
-setopt EXTENDED_GLOB
-setopt HIST_FIND_NO_DUPS
-setopt HIST_IGNORE_SPACE
+setopt \
+ extendedglob \
+ list_types \
+ nocorrect \
+ list_ambiguous \
+ bash_auto_list \
+ list_packed \
+ interactive_comments \
+ nohup \
+ autocd \
+ CHECK_JOBS \
+ BG_NICE \
+ APPEND_HISTORY \
+ INC_APPEND_HISTORY \
+ HIST_IGNORE_DUPS \
+ EXTENDED_GLOB \
+ HIST_FIND_NO_DUPS \
+ HIST_IGNORE_SPACE \
+
+HISTFILE=~/.zsh_history
+HISTSIZE=50000
+SAVEHIST=50000
case $TERM in
@@ -121,10 +112,6 @@ if [ -x /usr/bin/lesspipe ] ; then
eval `lesspipe`
fi
-export CVS_RSH=ssh
-export RSYNC_RSH=ssh
-export CVSROOT=weasel@cvs.noreply.org:/var/cvs/weasel/debian
-export CVSDEB_ROOTDIR=$HOME/projects/debian/Packages
export DEBEMAIL="weasel@debian.org"
@@ -133,11 +120,6 @@ export DEBEMAIL="weasel@debian.org"
typeset WORDCHARS='|'$WORDCHARS
# malsync
-export PILOTRATE=115200
-alias malsync='malsync -p proxy -r 3128'
-
-alias spider='/usr/lib/python2.1/site-packages/PyPlucker/Spider.py -f WeaselsPalmHome'
-
if [ "$SYSTEM" = "Linux" ] ; then
eval `dircolors`
LS_COLORS="$LS_COLORS""*.divx=01;35:"
@@ -145,19 +127,12 @@ if [ "$SYSTEM" = "Linux" ] ; then
alias ls='ls --color=auto -F'
alias grep='grep --color'
fi
-alias ll='ls -l'
-alias la='ls -la'
-alias l='ls -l'
-
alias cp='cp -i'
alias mv='mv -i'
alias mmv='noglob mmv'
alias zinterdiff='interdiff -z'
-alias tgrep='grep --binary-file=without-match'
-
-alias slrn='slrn --inews'
alias defaultfixed='echo -n -e "\033]50;fixed\007"'
alias default='echo -n -e "\033]50;-misc-fixed-medium-r-normal--13-120-75-75-c-70-iso8859-15\007"'
@@ -172,7 +147,6 @@ alias huge='echo -n -e "\033]50;-misc-fixed-medium-r-normal--20-200-75-75-c-100-
[[ -x /sbin/ifconfig ]] && alias ifconfig=/sbin/ifconfig
[[ -x /sbin/route ]] && alias route=/sbin/route
-
if [ -x /usr/bin/recode ]; then
alias unix2dos='recode lat1..ibmpc'
alias dos2unix='recode ibmpc..lat1'
@@ -181,18 +155,21 @@ fi
alias 221='pstops "2:0L@.7(21cm,0)+1L@.7(21cm,14.85cm)"'
alias rot13='tr a-zA-Z n-za-mN-ZA-M'
-#alias xlock='ssh-add -D && xlock -mode blank'
-#alias 64216="base64-decode | perl -e 'undef \$/; \$a=<>; print unpack(\"H\*\", \$a),\"\n\";'"
alias 64216='perl -MMIME::Base64 -e "print unpack(\"H*\", decode_base64(<>)),\"\n\""'
alias 16264='perl -MMIME::Base64 -e "\$l=<>; chomp \$l; print encode_base64(pack(\"H*\", \$l)),\"\n\""'
-alias base64-encode='perl -MMIME::Base64 -e "print encode_base64(<>)"'
-alias base64-decode='perl -MMIME::Base64 -e "print decode_base64(<>)"'
+
+if [ -x /usr/bin/base64 ]; then
+ alias base64-encode=base64
+ alias base64-decode='base64 -d'
+else
+ alias base64-encode='perl -MMIME::Base64 -e "print encode_base64(<>)"'
+ alias base64-decode='perl -MMIME::Base64 -e "print decode_base64(<>)"'
+fi
alias vnc='xtightvncviewer -encodings "tight copyrect" -compresslevel 9 -quality 4'
alias rdesktop-w='rdesktop -x l -g 1280x1024 -a 16 172.22.118.112'
-
if [ -f ~/.ssh/alias ] ; then
. ~/.ssh/alias
else
@@ -201,23 +178,10 @@ else
fi
fi
-if [ "$HOSTNAME" = 'danube' ]; then
- alias cfs-attach='cattach -t 20 $HOME/.cfs weasel'
- alias send-mail='sudo -u uucp /usr/sbin/uucico -r1 -x3 -f -snautilus.3node.com'
-fi
-if [ "$HOSTNAME" = 'danubeX.local.' ]; then
- alias vi='vim'
-fi
-if [ "$HOSTNAME" = 'opium' ] || [ "$HOSTNAME" = 'asteria' ]; then
- alias ldapvi='ldapvi -h ldap-server -D cn=weasel,ou=admins,ou=staff,o=hosting.noreply.org -w `grep bindpw $HOME/.noreply.ldap | cut -d" " -f 2`'
-fi
if [ "$HOSTNAME" = 'thetis' ] ; then
- alias ldapvi='ldapvi -h localhost -D cn=admin,o=ab.office.dibral.at -w `grep bindpw $HOME/.noreply.ldap | cut -d" " -f 2`'
+ alias ldapvi='ldapvi --encoding=ASCII -h localhost -D cn=admin,o=ab.office.dibral.at -w `grep bindpw $HOME/.noreply.ldap | cut -d" " -f 2`'
fi
-if [ "$HOSTNAME" = 'andromeda' ] ; then
- alias ldapvi-nonanoymous='ldapvi -h localhost -D uid=weasel,ou=users,ou=accounts,dc=oftc,dc=net -b dc=oftc,dc=net'
-fi
-if [ "$HOSTNAME" = 'asteria' ] && [ -r "$HOME/.oftc-hosts" ] ; then
+if [ "$HOSTNAME" = 'anguilla' ] && [ -r "$HOME/.oftc-hosts" ] ; then
cat "$HOME/.oftc-hosts" | while read name ip; do
alias -g $name-ip="$ip"
alias irssi-$name="irssi --home=$HOME/.irssi-MASTER --connect=OFTC-$name"
@@ -227,7 +191,6 @@ if [ "$HOSTNAME" = 'asteria' ] && [ -r "$HOME/.oftc-hosts" ] ; then
done
fi
-
if [ -e /etc/debian_chroot ]; then
debian_chroot=$(cat /etc/debian_chroot)
fi
@@ -273,12 +236,6 @@ if [ -d $HOME/local/share/man ] ; then
MANPATH="${HOME}/local/share/man:${MANPATH}"
fi
-if [ `uname -s` = "Darwin" ] ; then
- if [ "$TERM" = "xterm" ]; then
- export TERM="xterm-color"
- fi
-fi
-
# we want colorful listings
zmodload -i zsh/complist
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
@@ -292,24 +249,6 @@ autoload -U compinit
compinit
##########
-cols() {
- COLS_awkvar=""
- COLS_firstarg=1
-
- [ "$#" -eq 0 ] && { printf "cols: No parameters supplied.\n" >&2; return 1; }
-
- for COLS_arg in "$@"; do
- if [ "$COLS_firstarg" -eq 1 ]; then
- COLS_awkvar="print \$$COLS_arg"
- COLS_firstarg=0
- else
- COLS_awkvar="$(printf '%s "\t" $%s' "$COLS_awkvar" "$COLS_arg")"
- fi
- done
-
- awk "{ $COLS_awkvar }"
-}
-
upgrade-porter-chroots() {
cd
for i in $DEBPORTERHOSTS; do
@@ -484,7 +423,6 @@ if [ -x /usr/games/fortune ]; then
fi
-
#watch=( $(<~/.friends) ) # watch for people in .friends file
watch=(notme) # watch for everybody but me
LOGCHECK=300 # check every 5 min for login/logout activity
@@ -503,11 +441,6 @@ elif [ "$SSH_AUTH_SOCK" = "" ] && [ -e "$HOME/.ssh-auth-sock" ]; then
fi
-# Complete sshc as ssh
-compdef _ssh sshc=ssh
-compdef _ssh cssh=ssh
-
-#alias scp="scp -S $HOME/bin/ssh"
alias hs-mplayer='mplayer -ao alsa:device=hw=1'
[ -e $HOME/.zshrc-local ] && . $HOME/.zshrc-local