#!/usr/local/bin/zsh # .zsh setup file -*- mode: shell-script; -*- # # $Id: dot-zshrc,v 1.2 2005/06/04 11:36:49 simon Exp $ # # by Simon L. Nielsen # ##################################################################### ## User configuration (can be overridden in ~/.zshrc.conf) : ##################################################################### export DEFAULT_PROMPT="[%n@%m:%c] " # Enable special xterm title change? XTERM_TITLE_PROMPT=1 # What should be in the xterm title XTERM_TITLE="%n@%m:%~" # Read custom config if [ -r "${HOME}/.zshrc.conf" ]; then . "${HOME}/.tcshrc.conf" fi ##################################################################### ## Misc environment stuff ##################################################################### export P4CONFIG=".p4config" export FTP_PASSIVE_MODE="YES" export PATH="${HOME}/bin:${PATH}:${HOME}/scripts" ##################################################################### ## Misc extra completions ##################################################################### autoload -U compinit compinit [[ -f $HOME/.ssh/known_hosts ]] && hostnames+=( ${${${${(f)"$(<$HOME/.ssh/known_hosts)"}:#[0-9]*}%%\ *}%%,*} ) zstyle ':completion:*:*:ssh:*:hosts' hosts $hostnames zstyle ':completion:*:*:ftp:*:hosts' hosts $hostnames zstyle ':completion:*:hosts' hosts $hostnames ##################################################################### ## Misc aliases ##################################################################### alias ls="ls -F" alias ll="ls -l" alias la="ls -loa" alias lh="la -lh" alias cp="cp -i" alias mv="mv -i" alias fullsync "sync && sync && sync && sync && sync && sync && sync" alias qcvsupd "cvs update | grep -Ev '^\?'" ##################################################################### ## Default shell setup ##################################################################### # Set default prompt export PS1="${DEFAULT_PROMPT}" case "$TERM" in xterm*) if [ -n "${XTERM_TITLE_PROMPT}" ]; then precmd () {print -Pn "\e]0;${XTERM_TITLE}\a"} fi esac # Tell zsh to stop being annoying and just show the damn thing (e.g. # when completing a long list). LISTMAX=1000000; export LISTMAX ##################################################################### ## Custom additions to zshrc ##################################################################### # Read custom .zshrc if [ -r "${HOME}/.zshrc.local" ]; then . "${HOME}/.zshrc.local" fi