MAC Bash RC

Source: Internet
Author: User

######################################

##########. 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.