6
6
7
7
CONFIG_FILE=~ /.tmux-git.conf
8
8
9
- # Use a different readlink according the OS
9
+ # Use a different readlink according the OS.
10
+ # Kudos to https://github.com/npauzenga for the PR
10
11
if [[ ` uname` == ' Darwin' ]]; then
11
12
# Mac
12
13
READLINK=' greadlink -e'
@@ -27,7 +28,8 @@ if [ ! -f $CONFIG_FILE ]; then
27
28
TMUX_STATUS_LOCATION='right'
28
29
29
30
# Status for where you are out of a repo. Default is your pre-existing status
30
- # line. Idea from https://github.com/danarnold
31
+ # line.
32
+ # Kudos to https://github.com/danarnold for the idea.
31
33
TMUX_OUTREPO_STATUS=`tmux show -vg status-$TMUX_STATUS_LOCATION`
32
34
33
35
# Function to build the status line. You need to define the $TMUX_STATUS
@@ -96,8 +98,9 @@ find_git_stash() {
96
98
}
97
99
98
100
update_tmux () {
99
-
100
- # This only work if the cwd is outside of the last branch
101
+
102
+ # The trailing slash is for avoiding conflicts with repos with
103
+ # similar names. Kudos to https://github.com/tillt for the bug report
101
104
CWD=` $READLINK " $( pwd) " ` /
102
105
103
106
LASTREPO_LEN=${# TMUX_GIT_LASTREPO}
@@ -130,7 +133,7 @@ update_tmux() {
130
133
update_tmux
131
134
else
132
135
# Be sure to unset GIT_DIRTY's bright when leaving a repository.
133
- # Idea from https://github.com/danarnold
136
+ # Kudos to https://github.com/danarnold for the idea
134
137
tmux set-window-option status-$TMUX_STATUS_LOCATION -attr none > /dev/null
135
138
136
139
# Set the out-repo status
0 commit comments