######################################
##########. BASHRC
######################################
Case $-in
*i*) ;;
*) return;
Esac
# Bogus
if [-f/unix]; Then
Alias ls= '/BIN/LS-CGF '
Else
Alias ls= '/BIN/LS-GF '
Fi
Alias Ll= ' Ls-l '
Alias dir= ' Ls-ba '
Alias ss= "Ps-aux"
Alias dot= ' ls. [a-za-z0-9_]* '
Alias news= "Xterm-g 80x45-e trn-e-s1-n &"
Alias c= "Clear"
Alias m= "More"
Alias j= "Jobs"
# Common Misspellings
Alias Mroe=more
Alias Pdw=pwd
Hash-p/usr/bin/mail Mail
If [-Z "$HOST"]; Then
Export Host=${hostname}
Fi
Histignore= "[]*:&:BG:FG"
Psgrep ()
{
Ps-aux | grep $ | Grep-v grep
}
#
# This was a little like ' zap ' from Kernighan and Pike
#
PsKill ()
{
Local PID
pid=$ (Ps-ax | grep $ | grep-v grep | awk ' {print $} ')
Echo-n "Killing $ (process $pid) ..."
Kill-9 $pid
echo "slaughtered."
}
Term ()
{
Term=$1
Export term
Tset
}
Xtitle ()
{
Echo-n-E "\033]0;$*\007"
}
CD ()
{
Builtin CD "[email protected]" && xtitle $HOST: $PWD
}
Bold ()
{
Tput SMSO
}
Unbold ()
{
Tput RMSO
}
if [-f/unix]; Then
Clear ()
{
Tput Clear
}
Fi
ROT13 ()
{
if [$# = 0]; Then
TR "[A-m][n-z][a-m][n-z]" "[N-z][a-m][n-z][a-m]"
Else
TR "[A-m][n-z][a-m][n-z]" "[N-z][a-m][n-z][a-m]" <
Fi
}
Watch ()
{
If [$#-ne 1]; Then
Tail-f Nohup.out
Else
Tail-f $
Fi
}
#
# Remote Login Passing all 8 bits (so meta key would work)
#
RL ()
{
Rlogin $*-8
}
function setenv ()
{
If [$#-ne 2]; Then
echo "Setenv:too Few arguments"
Else
Export $1= "$"
Fi
}
function Chmog ()
{
If [$#-ne 4]; Then
echo "USAGE:CHMOG mode owner group file"
Return 1
Else
chmod $ $4
Chown $ $4
CHGRP $ $4
Fi
}
######################################
########## . PS1
######################################
If [-Z ' $PS 1 "]; Then
Return
Fi
Ps1= ' \e[35;36m[\[email protected]\w] $\e[0m '
######################################
##########. Git-completion.bash
######################################
SOURCE ~/.git-completion.bash
######################################
########## Brew
######################################
Export path= $PATH:/users/xiaomi/opt/brew/bin
MAC Bash RC