Fixed PS1 not updating branch name for git repos

pull/1/head
Adam Veldhousen 10 years ago
parent 6e423fef28
commit 2d74557da6

@ -61,7 +61,9 @@ GRAY="\[\033[1;30m\]"
EMPTY="\[\033[0;37m\]"
LIGHTBLUE="\[\033[38;5;111m\]"
LIGHTRED="\[\033[38;5;172m\]"
LIGHTORANGE="\[\033[38;5;172m\]"
LIGHTGREEN="\[\033[38;5;70m\]"
LIGHTRED="\[\033[38;5;161m\]"
LIGHTYELLOW="\[\033[38;5;229m\]"
CONTINUE="\[\033[38;5;242m\]"
DARKGRAY="\[\033[38;5;247m\]"
@ -89,11 +91,11 @@ parse_git_branch_or_tag() {
# Pretty ugly hack for msys... need to figure out how to determine if my
# console is 256 color capable
if [ $OSTYPE = 'msys' ]; then
PS1="$GREEN[\$(date +%H:%M)] \u@\h $RED$(parse_git_branch_or_tag) $YELLOW\w \n\$ $GRAY"
PS2="$CONTINUE> "
PROMPT_COMMAND='PS1="$GREEN[\$(date +%H:%M)] \u@\h $RED$(parse_git_branch_or_tag) $YELLOW\w \n\$ $GRAY"
PS2="$CONTINUE> "'
else
PS1="$LIGHTBLUE[\$(date +%H:%M)] \u@\h $LIGHTRED$(parse_git_branch_or_tag) $LIGHTYELLOW\w \n$EMPTY\$ $DARKGRAY"
PS2="$CONTINUE> "
PROMPT_COMMAND='PS1="$LIGHTBLUE[\$(date +%H:%M)] $LIGHTGREEN\u@\h $LIGHTRED$(parse_git_branch_or_tag) $LIGHTYELLOW\w \n$EMPTY\$ $DARKGRAY"
PS2="$CONTINUE> "'
fi
# Load any extra aliases

@ -67,7 +67,7 @@
# More info: <http://www.git-tower.com/blog/make-git-rebase-safe-on-osx/>
trustctime = false
editor = gvim
autocrlf = true
autocrlf = input
[color]
# Use colors in Git commands that are capable of colored output when

@ -6,9 +6,16 @@
# Author : Adam Veldhousen The USA #
#------------------------------------------------------------------------------#
#default to zsh
set -g default-command /bin/zsh
set -g default-shell /bin/zsh
# enable pbcopy and pbpaste support with reattach-to-user-namespace
set-option -g default-command "reattach-to-user-namespace -l bash"
set-option -g default-shell /bin/bash
set-option -g default-command "reattach-to-user-namespace -l zsh"
bind C-c run "tmux save-buffer - | reattach-to-user-namespace pbcopy"
bind C-v run "tmux set-buffer \"$(reattach-to-user-namespace pbpaste)\"; tmux paste-buffer"
set -g default-terminal screen-256color
# set esc-wait off, so vim works
set-option -sg escape-time 0
@ -27,16 +34,21 @@ set-option -g visual-bell on
#status bar
set-option -g status-utf8 on
set-option -g status-keys vi
set-option -g status-interval 5
set-option -g status-justify left
set-option -g status-left ' #h | Adam Veldhousen'
set-option -g status-right 'tmux is rad | %d-%m-%Y %H:%M:%ss #[default]'
# copy mode
set-option buffer-limit 10
#window options
set-window-option -g utf8 on
set-window-option -g clock-mode-style 24
set-window-option -g monitor-activity on
set-window-option -g automatic-rename on
set-window-option -g mode-mouse on
# Window nav
unbind-key 1 ; bind-key 1 select-window -t 1
@ -79,15 +91,18 @@ unbind-key R ; bind-key R source-file ~/.tmux.conf
unbind-key q ; bind-key q list-keys
unbind-key M-q ; bind-key M-q list-keys
# copy mode
set-window-option -g mode-keys vi
set-window-option -g mode-mouse off
# vim behavior
setw -g mode-keys vi
unbind [ ; bind Escape copy-mode
unbind p ; bind p paste-buffer
bind -t vi-copy 'v' begin-selection
bind -t vi-copy 'y' copy-selection
set-option buffer-limit 10
#vim airline integration
source ~/Tools/vim/.vimrc
#unbind-key ^A-c ; bind-key -n ^A-c copy-mode
#unbind-key ^A-NPage ; bind-key -n ^A-NPage copy-mode
#unbind-key ^A-PPage ; bind-key -n ^A-PPage copy-mode
#unbind-key ^A-i ; bind-key -n ^A-i paste-buffer
#unbind-key ^A-P ; bind-key -n ^A-P paste-buffer

BIN
.vimrc

Binary file not shown.
Loading…
Cancel
Save