.bashrc

mac 2012. 4. 29. 21:55

 System-wide .bashrc file for interactive bash(1) shells.

if [ -z "$PS1" ]; then

   return

fi


PS1='\h:\W \u\$ '

# Make bash check its window size after a process completes

shopt -s checkwinsize

# Tell the terminal about the working directory at each prompt.

if [ "$TERM_PROGRAM" == "Apple_Terminal" ] && [ -z "$INSIDE_EMACS" ]; then

    update_terminal_cwd() {

        # Identify the directory using a "file:" scheme URL,

        # including the host name to disambiguate local vs.

        # remote connections. Percent-escape spaces.

    local SEARCH=' '

    local REPLACE='%20'

    local PWD_URL="file://$HOSTNAME${PWD//$SEARCH/$REPLACE}"

    printf '\e]7;%s\a' "$PWD_URL"

    }   

    PROMPT_COMMAND="update_terminal_cwd; $PROMPT_COMMAND"

fi


alias ll='ls -l'

alias maketag='source ~/bin/ctag_cscope.sh'


# Define how Bash prompt looks like:

#


# Cli Colors

export CLICOLOR=1

# use yellow for dir's

export COLOR_NC='\033[0m' # No Color

export COLOR_WHITE='\033[1;37m'

export COLOR_BLACK='\033[0;30m'

export COLOR_BLUE='\033[0;34m'

export COLOR_LIGHT_BLUE='\033[1;34m'

export COLOR_GREEN='\033[0;32m'

export COLOR_LIGHT_GREEN='\033[1;32m'

export COLOR_CYAN='\033[0;36m'

export COLOR_LIGHT_CYAN='\033[1;36m'

export COLOR_RED='\033[0;31m'

export COLOR_LIGHT_RED='\033[1;31m'

export COLOR_PURPLE='\033[0;35m'

export COLOR_LIGHT_PURPLE='\033[1;35m'

export COLOR_BROWN='\033[0;33m'

export COLOR_YELLOW='\033[1;33m'

export COLOR_GRAY='\033[1;30m'

export COLOR_LIGHT_GRAY='\033[0;37m'

alias colorslist="set | egrep 'COLOR_\w*'"  # lists all the colors


#Prompt

export PS1="${COLOR_GREEN}\w$ ${COLOR_NC}"


# Alias

alias ls='ls -G'

alias ll='ls -hl'

alias la='ls -a'

alias lla='ls -lah'


# history handling

#

# Erase duplicates

export HISTCONTROL=erasedups

# resize history size

export HISTSIZE=10000

# append to bash_history if Terminal.app quits

shopt -s histappend

'mac' 카테고리의 다른 글

lion mac port  (0) 2011.11.22
mac에서 .bashrc enable  (0) 2011.02.27
Posted by 황승곤
,