# Piaip's profile for sh/bash: EACH LOGIN # # $Log: dot.shrc,v $ # Revision 1.2 1999/02/05 17:27:20 piaip # Changed. Not very good, yet. # # Revision 1.1 1999/02/03 06:58:47 piaip # Initial revision # # This file should contain aliases, shell variables, and functios, # those cannot be passed to child process. # # Ref to .profile for details # ## Piaip Standard Aliases # alias mv='mv -i' alias lynx='lynx -cfg=~/lynx.cfg' alias cp='cp -i' alias rm=_rm alias rrm='/bin/rm -i' alias vi=vim alias lls='ls -F' alias mutt='env TERM=screen LC_MESSAGES=zh_TW.Big5 mutt' alias irssi='env LANG=zh_TW.UTF-8 irssi' os=${OSTYPE/[^a-z]*/} case "$os" in "freebsd") alias ls='gnuls --color --show-control-chars -F' ;; "linux") alias ls='ls --color --show-control-chars -F' ;; "solaris") alias ls='ls --color --show-control-chars -F' alias telnet=_telnet alias ping="ping -s" ;; esac ## Local aliases # alias screen='env TERM=vt100-w screen' #alias screen='env TERM=vt100-w screen -D -R' ## Local functions and commands # function _telnet() { /usr/ucb/telnet `cwhatip $1` $2 $3; } function ll() { ls -l $* ; } function _rm() { for i in $* do mv $i $HOME/tmp echo "$i deleted." done } ## Information # # Warning: 'alias' has a higher priority than functions. # So if you want to define a function, remeber to 'unalias' first. # functions can be shown by 'set', and ls() { ls ; } is recursive. # ## Standard functions # ## Extra aliases # alias grep=egrep alias cons25='export TERM=cons25' alias vt100='export TERM=vt100' alias talk=ytalk ## Shell style # if [ $SHELL = "/bin/sh" ]; then if [ "$WINDOW" != "" ]; then SCRPREFIX="\[\033k\033\134\]" # NOCOLOR="\[\033[0m\]" export PS1="$LOGNAME@`hostname` [W$WINDOW] $SCRPREFIX" #$NOCOLOR" else export PS1="$LOGNAME@`hostname`$ " fi else if [ "$WINDOW" != "" ]; then SCRPREFIX="\[\033k\033\134\]" # NOCOLOR="\[\033[0m\]" export PS1="$LOGNAME@\h {\w} [W$WINDOW] $SCRPREFIX" #$NOCOLOR" # export TERM=screen # stty erase '^H' else export PS1="\u@\h [\w] " # stty erase '^?' fi fi ## Return to $HOME # cd $HOME