技術めも

OS設定メモ

.bash_profile .bashrc

alias du='du -sh'
alias ll='ls -lG'
alias ls='ls -G'
alias psa='ps -elf | grep -v grep | grep '
alias rm='rm -i'
alias gsab='git show-branch --all --color'
alias vi='vim'
alias which='which --tty-only --read-alias --show-dot --show-tilde'
alias xgrep='find . -name \* -print | grep -v .svn | xargs grep -n '
alias log='cd /var/log/http/`date +%Y/%m/%d/`;pwd;' 

# show git branch
function parse_git_branch {
  git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
function precmd() {
  PROMPT="\h@\u:\W\$(parse_git_branch) \$ "
}
function proml {
  PS1="\h@\u:\W\$(parse_git_branch) \$ "
}
proml

/etc/profile

# If the user belongs to 'contents', set umask 002
if [ "`id -gn`" = "contents" ]; then
  umask 002
fi