Автозаполнение команд и отображение имени ветки в пути
This commit is contained in:
parent
7d1e76f17c
commit
4fd0fbfb91
|
|
@ -1,6 +1,8 @@
|
|||
# Базовая конфигурация git
|
||||
|
||||
## Возможности
|
||||
* Автозавершение команд и названий веток по табу
|
||||
* Отображение названия текущей ветки в консоли. gaech@mac:~/Projects/My/git-config[master]
|
||||
* Глобальный ignore файл
|
||||
* Сокращения для основных команд
|
||||
* pull → pl
|
||||
|
|
@ -18,7 +20,7 @@
|
|||
## Перед запуском
|
||||
Создаем симлинк для SublimeText 2
|
||||
|
||||
ln -s "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" ~/bin/subl
|
||||
sudo ln -s "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" /bin/subl
|
||||
|
||||
Задаем имя и адрес почты в настройках git
|
||||
|
||||
|
|
@ -27,4 +29,5 @@
|
|||
|
||||
## Установка
|
||||
git clone git://github.com/gaech/git-config.git
|
||||
sh git-config/install.sh
|
||||
cd git-config/
|
||||
sh install.sh
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
|
||||
source ~/.git_completion
|
||||
|
||||
|
||||
function parse_git_branch {
|
||||
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/[\1]/'
|
||||
}
|
||||
|
||||
function proml {
|
||||
case $TERM in
|
||||
xterm*)
|
||||
TITLEBAR='\[\033]0;\u@\h:\w\007\]'
|
||||
;;
|
||||
*)
|
||||
TITLEBAR=""
|
||||
;;
|
||||
esac
|
||||
|
||||
PS1="${TITLEBAR}\
|
||||
\u@\h:\w\$(parse_git_branch)\
|
||||
\$ "
|
||||
PS2='> '
|
||||
PS4='+ '
|
||||
}
|
||||
proml
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -10,3 +10,7 @@ git config --global user.name "$name"
|
|||
|
||||
cp -f gitignore ~/.gitignore_global
|
||||
git config --global core.excludesfile ~/.gitignore_global
|
||||
|
||||
cp -f gitcompletion ~/.git_completion
|
||||
|
||||
cat bashprofile >> ~/.bash_profile
|
||||
Loading…
Reference in New Issue