Wednesday, February 22, 2012

내 .bashrc 설정 ;)



 1 # ~/.bashrc: executed by bash(1) for non-login shells.
  2 # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
  3 # for examples
  4 PS1='\[\e[1;32m\][\u\[\e[1;33m\] \w\[\e[1;32m\]] \[\e[0m\]'
  5
  6 # If not running interactively, don't do anything
  7 [ -z "$PS1" ] && return
  8
  9 # don't put duplicate lines in the history. See bash(1) for more options
 10 # ... or force ignoredups and ignorespace
 11 HISTCONTROL=ignoredups:ignorespace
 12
 13 # append to the history file, don't overwrite it
 14 shopt -s histappend
 15
 16 # for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
 17 HISTSIZE=1000
 18 HISTFILESIZE=2000
 19
 20 # check the window size after each command and, if necessary,
 21 # update the values of LINES and COLUMNS.
 22 shopt -s checkwinsize
 23
 24 # make less more friendly for non-text input files, see lesspipe(1)
 25 [ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
 26
 27 # set variable identifying the chroot you work in (used in the prompt below)
 28 if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
 29     debian_chroot=$(cat /etc/debian_chroot)
 30 fi
 31
 32 # set a fancy prompt (non-color, unless we know we "want" color)
 33 case "$TERM" in
 34     xterm-color) color_prompt=yes;;
 35 esac
 36
 37 # uncomment for a colored prompt, if the terminal has the capability; turned
 38 # off by default to not distract the user: the focus in a terminal window
 39 # should be on the output of commands, not on the prompt
 40 #force_color_prompt=yes
 41
 42 if [ -n "$force_color_prompt" ]; then
 43     if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
 44     # We have color support; assume it's compliant with Ecma-48
 45     # (ISO/IEC-6429). (Lack of such support is extremely rare, and such
 46     # a case would tend to support setf rather than setaf.)
 47     color_prompt=yes
 48     else
 49     color_prompt=
50     fi
 51 fi
 52
 53 unset color_prompt force_color_prompt
 54
 55 # enable color support of ls and also add handy aliases
 56 if [ -x /usr/bin/dircolors ]; then
 57     test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
 58     alias ls='ls --color=auto'
 59     #alias dir='dir --color=auto'
 60     #alias vdir='vdir --color=auto'
 61
 62     alias grep='grep --color=auto'
 63     alias fgrep='fgrep --color=auto'
 64     alias egrep='egrep --color=auto'
 65 fi
 66
 67 # some more ls aliases
 68 alias ll='ls -alF'
 69 alias la='ls -A'
 70 alias l='ls -al'
 71 alias u='cd ..'
 72 alias r='cd ~'
 73 alias p='cd -'
 74 alias mygrep='grep -RHni --exclude=.git --exclude=svn'
 75
 76 # Alias definitions.
 77 # You may want to put all your additions into a separate file like
 78 # ~/.bash_aliases, instead of adding them here directly.
 79 # See /usr/share/doc/bash-doc/examples in the bash-doc package.
 80
 81 if [ -f ~/.bash_aliases ]; then
 82     . ~/.bash_aliases
 83 fi
 84
 85 # enable programmable completion features (you don't need to enable
 86 # this, if it's already enabled in /etc/bash.bashrc and /etc/profile
 87 # sources /etc/bash.bashrc).
 88 if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
 89     . /etc/bash_completion
 90 fi


1 comment:

  1. 여서 중요한건
    4 PS1='\[\e[1;32m\][\u\[\e[1;33m\] \w\[\e[1;32m\]] \[\e[0m\]'
    요놈 컬러 넣어서 보기 편하게;;
    그리고 71 alias u='cd ..'
    72 alias r='cd ~'
    73 alias p='cd -'
    74 alias mygrep='grep -RHni --exclude=.git --exclude=svn'
    이놈들 내가 자주쓰는것들

    ReplyDelete