Przeglądaj źródła

move git config command from .profile to .bashrc and change it to function

pull/1/head
10sr 13 lat temu
rodzic
commit
e9d7e9235d
2 zmienionych plików z 15 dodań i 13 usunięć
  1. +15
    -1
      .bashrc
  2. +0
    -12
      .profile

+ 15
- 1
.bashrc Wyświetl plik

@@ -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

}

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


+ 0
- 12
.profile Wyświetl plik

@@ -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


Ładowanie…
Anuluj
Zapisz