12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- #
- # Editor
- #
- if -exe emacs; then
- export EDITOR='emacs -nw'
- fi
- if [ -n "$EDITOR" -a -n "$SUDO_USER" -a "$UID" = 0 -a "$EDITOR[1,5]" = 'emacs' ]; then
- e="$EDITOR -u $SUDO_USER"
- else
- alias e=$EDITOR
- fi
- #
- # Pager
- #
- if -exe most; then
- export PAGER=most
- alias less='most'
- alias more='most'
- elif -exe less; then
- export PAGER=less
- elif -exe more; then
- export PAGER=more
- fi
- #
- # Common aliases
- #
- alias rm='rm -i'
- alias mv='mv -i'
- alias cp='cp -i'
- alias vlock='clear;vlock'
- alias q='clear;exit'
- alias grep="grep --color=tty"
- alias mgrep="grep --color=tty -rnisH"
- alias rsu="sudo zsh"
- alias reload="exec zsh"
- #
- # Log viewers aliases
- #
- if -exe ccze; then
- alias slog="tail -n 300 -f /var/log/syslog | ccze"
- alias mlog="tail -n 300 -f /var/log/mail.log | ccze"
- else
- alias slog="tail -n 60 -f /var/log/syslog"
- alias mlog="tail -n 60 -f /var/log/mail.log"
- fi
- # using colortail if available (freebsd)
- if -exe colortail; then
- alias slog="colortail -n 60 -k /usr/local/share/examples/colortail/conf.messages -f /var/log/syslog"
- fi
- #
- # System tools aliases
- #
- alias df='df -h'
- if -exe pydf; then
- alias df="pydf -h"
- fi
- #
- # Devel tools aliases
- #
- if -exe colordiff; then
- diff='colordiff'
- if -exe tput; then
- alias cdiff='colordiff -yW$(tput cols)'
- fi
- fi
- if -exe colormake; then
- alias make="colormake"
- fi
- #
- # Git stuff
- #
- if [ -z "$GIT_PAGER" ]; then
- for p in less more cat; do
- if -exe "$p"; then
- alias git="PAGER=$p git"
- break
- fi
- done
- fi
|