Skip to content

Commit bebf772

Browse files
Older bash might not like hyphens in function names
1 parent f8d69c4 commit bebf772

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

scripts/git-prompt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ branch() {
99
}
1010

1111
# <https://stackoverflow.com/a/59115583>
12-
rebase-branch-old() {
12+
rebase_branch_old() {
1313
path=$(git rev-parse --git-path rebase-apply) # rebase.backend is apply
1414
if test -d ${path}; then
1515
revision=$(<${path}/head-name)
@@ -18,7 +18,7 @@ rebase-branch-old() {
1818
}
1919

2020
# <https://stackoverflow.com/a/59115583>
21-
rebase-branch-new() {
21+
rebase_branch_new() {
2222
path=$(git rev-parse --git-path rebase-merge) # rebase.backend is merge
2323
if test -d ${path}; then
2424
revision=$(<${path}/head-name)
@@ -39,8 +39,8 @@ if ! is_git_repo; then
3939
fi
4040

4141
PROMPT=$(branch)
42-
REBASE_BRANCH=$(rebase-branch-new)
43-
REBASE_BRANCH_OLD=$(rebase-branch-old)
42+
REBASE_BRANCH=$(rebase_branch_new)
43+
REBASE_BRANCH_OLD=$(rebase_branch_old)
4444
if [[ -n "$REBASE_BRANCH" ]]; then
4545
PROMPT="$REBASE_BRANCH [rebasing]"
4646
elif [[ -n "$REBASE_BRANCH_OLD" ]]; then

0 commit comments

Comments
 (0)