Skip to content

Commit

Permalink
Replace \c-terminated echo calls by more portable printf calls.
Browse files Browse the repository at this point in the history
  • Loading branch information
nvie committed Mar 23, 2010
1 parent b1033aa commit f6228ed
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions git-flow-init
Expand Up @@ -78,7 +78,7 @@ cmd_default() {
done
fi

echo "Branch name for production releases: [$default_suggestion] \c"
printf "Branch name for production releases: [$default_suggestion] "
read answer
master_branch=${answer:-$default_suggestion}

Expand Down Expand Up @@ -121,7 +121,7 @@ cmd_default() {
done
fi

echo "Branch name for \"next release\" development: [$default_suggestion] \c"
printf "Branch name for \"next release\" development: [$default_suggestion] "
read answer
develop_branch=${answer:-$default_suggestion}

Expand Down Expand Up @@ -191,7 +191,7 @@ cmd_default() {
# Feature branches
if ! git config --get gitflow.prefix.feature >/dev/null 2>&1 || flag force; then
default_suggestion=$(git config --get gitflow.prefix.feature || echo feature/)
echo "Feature branches? [$default_suggestion] \c"
printf "Feature branches? [$default_suggestion] "
read answer
[ "$answer" = "-" ] && prefix= || prefix=${answer:-$default_suggestion}
git config gitflow.prefix.feature "$prefix"
Expand All @@ -200,7 +200,7 @@ cmd_default() {
# Release branches
if ! git config --get gitflow.prefix.release >/dev/null 2>&1 || flag force; then
default_suggestion=$(git config --get gitflow.prefix.release || echo release/)
echo "Release branches? [$default_suggestion] \c"
printf "Release branches? [$default_suggestion] "
read answer
[ "$answer" = "-" ] && prefix= || prefix=${answer:-$default_suggestion}
git config gitflow.prefix.release "$prefix"
Expand All @@ -210,7 +210,7 @@ cmd_default() {
# Hotfix branches
if ! git config --get gitflow.prefix.hotfix >/dev/null 2>&1 || flag force; then
default_suggestion=$(git config --get gitflow.prefix.hotfix || echo hotfix/)
echo "Hotfix branches? [$default_suggestion] \c"
printf "Hotfix branches? [$default_suggestion] "
read answer
[ "$answer" = "-" ] && prefix= || prefix=${answer:-$default_suggestion}
git config gitflow.prefix.hotfix "$prefix"
Expand All @@ -220,7 +220,7 @@ cmd_default() {
# Support branches
if ! git config --get gitflow.prefix.support >/dev/null 2>&1 || flag force; then
default_suggestion=$(git config --get gitflow.prefix.support || echo support/)
echo "Support branches? [$default_suggestion] \c"
printf "Support branches? [$default_suggestion] "
read answer
[ "$answer" = "-" ] && prefix= || prefix=${answer:-$default_suggestion}
git config gitflow.prefix.support "$prefix"
Expand All @@ -230,7 +230,7 @@ cmd_default() {
# Version tag prefix
if ! git config --get gitflow.prefix.versiontag >/dev/null 2>&1 || flag force; then
default_suggestion=$(git config --get gitflow.prefix.versiontag || echo "")
echo "Version tag prefix? [$default_suggestion] \c"
printf "Version tag prefix? [$default_suggestion] "
read answer
[ "$answer" = "-" ] && prefix= || prefix=${answer:-$default_suggestion}
git config gitflow.prefix.versiontag "$prefix"
Expand Down

0 comments on commit f6228ed

Please sign in to comment.