From e9d7e9235dfee7424212a71be9c01c21b38db5b6 Mon Sep 17 00:00:00 2001 From: 10sr Date: Fri, 16 Sep 2011 03:18:37 +0900 Subject: [PATCH] move git config command from .profile to .bashrc and change it to function --- .bashrc | 16 +++++++++++++++- .profile | 12 ------------ 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/.bashrc b/.bashrc index 06ccd1f..aef82b1 100755 --- a/.bashrc +++ b/.bashrc @@ -12,7 +12,7 @@ export PS1="\$(prompt_function)\$ " export PAGER="less" export EDITOR="vim" export VISUAL=$EDITOR -export LESS="-M" +export LESS="-iRM" # export LC_MESSAGES="C" # export LANG=ja_JP.UTF-8 # export CDPATH=".:~" # 使い方がよく分からない @@ -95,6 +95,19 @@ port-auto(){ port selfupdate && port sync && port upgrade installed } +mygitconfig(){ + # export GISTY_DIR="$HOME/dev/gists" + git config --global user.name "10sr" + git config --global user.email sr10@users.sourceforge.jp + git config --global core.autocrlf false + git config --global color.ui auto + git config --global alias.log-all "log --graph --all --color --pretty='%x09%h %cn%x09%s %Cred%d%Creset'" + git config --global alias.log-all2 'log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short' + git config --global alias.log-all3 "log --graph --date-order -C -M --pretty=format:\"<%h> %ad [%an] %Cgreen%d%Creset %s\" --all --date=short" + git config --global alias.cmm "commit -m" + # git config --global github.token ** +} + prompt_function(){ # used by PS1 local lastreturn=$? if test "${TERM}" == dumb @@ -195,6 +208,7 @@ winln(){ else junction "$2" "$1" fi + } ######################## diff --git a/.profile b/.profile index 5367e92..4de5de6 100755 --- a/.profile +++ b/.profile @@ -28,18 +28,6 @@ addtopath(){ # export PATH="${PATH}:${HOME}/bin:${HOME}/dbx/dev/bin" addtopath ${HOME}/bin -type git 1>/dev/null 2>&1 && test ! -f ~/.gitconfig && { - # export GISTY_DIR="$HOME/dev/gists" - git config --global user.name "10sr" - git config --global user.email sr10@users.sourceforge.jp - git config --global core.autocrlf false - git config --global alias.log-all "log --graph --all --color --pretty='%x09%h %cn%x09%s %Cred%d%Creset'" - git config --global alias.log-all2 'log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short' - git config --global alias.log-all3 "log --graph --date-order -C -M --pretty=format:\"<%h> %ad [%an] %Cgreen%d%Creset %s\" --all --date=short" - git config --global alias.cmm "commit -m" - # git config --global github.token ** -} - test -f "${HOME}/.pythonrc" && export PYTHONSTARTUP="${HOME}/.pythonrc" export PYTHONPATH=~/.py