File tree Expand file tree Collapse file tree 4 files changed +14
-15
lines changed Expand file tree Collapse file tree 4 files changed +14
-15
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ rm autobuild/conffiles
8
8
# HACK: generate conffiles
9
9
cd abdist
10
10
IFS=$'\n'
11
- for i in $(find .); do
11
+ for i in $(find . -type f ); do
12
12
echo "${i/.\/}" >> autobuild/conffiles
13
13
done
14
14
IFS=$' \t\n'
Original file line number Diff line number Diff line change @@ -30,18 +30,17 @@ alias __git_branch="git branch 2>/dev/null | grep '*' | sed 's/*\ //g'"
30
30
31
31
# From http://mediadoneright.com/content/ultimate-git-ps1-bash-prompt
32
32
# Modified.
33
- _git_branch() {
34
- if git branch &>/dev/null
35
- then if LANG=C git status | grep "nothing to commit" &>/dev/null
36
- then printf "\e[1m@\e[0;32m$(__git_branch)\e[0m"
37
- elif LANG=C git status | grep "nothing added to commit" &>/dev/null # Untracked
38
- then printf "\e[1m@\e[0;35m$(__git_branch)\e[0m"
39
- else printf "\e[1m@$IRED$(__git_branch)\e[0m" # Change not added/not merged yet
40
- fi
41
- else false # Necessary, read bashrc_repo.
42
- fi
33
+ _git_status() {
34
+ git branch &>/dev/null || return 1
35
+ if LANG=C git status | grep -q "nothing to commit"; then
36
+ printf "\e[1m@\e[0;32m$(__git_branch)\e[0m"
37
+ elif LANG=C git status | grep -q "nothing added to commit"; then # Untracked
38
+ printf "\e[1m@\e[0;35m$(__git_branch)\e[0m"
39
+ else # Change not added/not merged yet
40
+ printf "\e[1m@$IRED$(__git_branch)\e[0m"
41
+ fi
43
42
}
44
43
45
44
46
45
# A shorter one without color
47
- # alias _git_branch="echo \" \ $(__git_branch)\""
46
+ # alias _git_status='_st=" $(__git_branch)"; ((!PIPESTATUS[0])) && echo "@$_st"'
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ alias ha='hg add .'
15
15
16
16
# From http://mediadoneright.com/content/ultimate-hg-ps1-bash-prompt
17
17
# Modified for hg.
18
- _hg_branch () {
18
+ _hg_status () {
19
19
if hg branch &>/dev/null
20
20
then if LANG=C hg status | grep " " &>/dev/null
21
21
then printf "\e[1m@\e[0;32m$(hg branch)\e[0m"
@@ -26,4 +26,4 @@ _hg_branch() {
26
26
}
27
27
28
28
# A shorter one without color
29
- # alias _hg_branch="echo \" \ $(hg branch 2>/dev/null)\""
29
+ # alias _hg_status='_st=" $(hg branch)" && echo "@$st"'
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ _vcs_status() {
26
26
_ret=$?
27
27
local _vcs
28
28
for _vcs in $_vcs_mods; do
29
- _"$_vcs"_branch && break
29
+ _"$_vcs"_status && break
30
30
done
31
31
return $_ret
32
32
}
You can’t perform that action at this time.
0 commit comments