Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Choice lisibility enhancement #165

Merged
merged 5 commits into from
Mar 1, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions inc/common.inc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ function assert_branches_equal () {
if [ $status -eq 1 ]; then
CUI_displayMsg warning "And local branch '<b>$1</b>' may be fast-forwarded!"
if ! isset_option 'I'; then
echo -n $(CUI_displayMsg question "Pull '$1'? [Y/N] "); read answer
echo -n $(CUI_displayMsg question "Pull '$1'? [y/N] "); read answer
[ "$answer" != "Y" ] && [ "$answer" != "y" ] && die "Pull aborted! You must make a 'git pull $TWGIT_ORIGIN $1' to continue."
fi
exec_git_command "git checkout $1" "Checkout '$1' failed!"
Expand Down Expand Up @@ -1372,7 +1372,7 @@ function clean_branches () {
local locales="$(get_local_branches)"
for branch in $locales; do
if ! has $branch $tracked; then
echo -n $(CUI_displayMsg question "Local branch '<b>$branch</b>' is not tracked. Remove? [Y/N] ")
echo -n $(CUI_displayMsg question "Local branch '<b>$branch</b>' is not tracked. Remove? [y/N] ")
read answer
if [ "$answer" = "Y" ] || [ "$answer" = "y" ]; then
exec_git_command "git branch -D $branch" "Remove local branch '$branch' failed!"
Expand Down Expand Up @@ -1599,7 +1599,7 @@ function is_initial_author () {
if [ ! "$localAuthorName <$localAuthorEmail>" = "$branchAuthor" ]; then
CUI_displayMsg warning "Remote $type '$TWGIT_ORIGIN/${prefixes[$type]}$branch_name' was started by $branchAuthor."
if ! isset_option 'I'; then
echo -n $(CUI_displayMsg question 'Do you want to continue? [Y/N] '); read answer
echo -n $(CUI_displayMsg question 'Do you want to continue? [y/N] '); read answer
[ "$answer" != "Y" ] && [ "$answer" != "y" ] && die 'Warning, '$type' retrieving aborted!'
fi
fi
Expand Down Expand Up @@ -1652,9 +1652,9 @@ function autoupdate () {
echo -e 'New content of CHANGELOG.md:\n'
displayChangelogSection "$current_tag" "$last_tag"
echo
question="Do you want to update twgit from <b>$current_tag</b> to <b>$last_tag</b> (or manually: twgit update)? [Y/N] "
question="Do you want to update twgit from <b>$current_tag</b> to <b>$last_tag</b> (or manually: twgit update)? [y/N] "
else
question="You are ahead of last tag <b>$last_tag</b>. Would you like to return to it? [Y/N] "
question="You are ahead of last tag <b>$last_tag</b>. Would you like to return to it? [y/N] "
fi
echo -n $(CUI_displayMsg question "\033[4m/!\ <b>twgit update</b>")
echo -n $(CUI_displayMsg question ": $question")
Expand Down
6 changes: 3 additions & 3 deletions inc/twgit_feature.inc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ function cmd_migrate () {


if ! isset_option 'I'; then
echo -n $(CUI_displayMsg question "Are you sure to migrate '$oldfeature_fullname' to '$feature_fullname'? Branch '$oldfeature_fullname' will be deleted. [Y/N] "); read answer
echo -n $(CUI_displayMsg question "Are you sure to migrate '$oldfeature_fullname' to '$feature_fullname'? Branch '$oldfeature_fullname' will be deleted. [y/N] "); read answer
[ "$answer" != "Y" ] && [ "$answer" != "y" ] && die 'Branch migration aborted!'
fi

Expand Down Expand Up @@ -334,7 +334,7 @@ function cmd_merge-into-release () {
if ! has "$TWGIT_ORIGIN/$current_branch" $all_features; then
die "You must be in a feature if you didn't specify one!"
else
echo -n $(CUI_displayMsg question "Are you sure to merge '$TWGIT_ORIGIN/$current_branch' into '$TWGIT_ORIGIN/$release_fullname'? [Y/N] "); read answer
echo -n $(CUI_displayMsg question "Are you sure to merge '$TWGIT_ORIGIN/$current_branch' into '$TWGIT_ORIGIN/$release_fullname'? [y/N] "); read answer
[ "$answer" != "Y" ] && [ "$answer" != "y" ] && die 'Merge into current release aborted!'
fi
feature_fullname="$current_branch"
Expand Down Expand Up @@ -376,7 +376,7 @@ function cmd_merge-into-hotfix () {
if ! has "$TWGIT_ORIGIN/$current_branch" $all_features; then
die "You must be in a feature if you didn't specify one!"
else
echo -n $(CUI_displayMsg question "Are you sure to merge '$TWGIT_ORIGIN/$current_branch' into '$TWGIT_ORIGIN/$hotfix_fullname'? [Y/N] "); read answer
echo -n $(CUI_displayMsg question "Are you sure to merge '$TWGIT_ORIGIN/$current_branch' into '$TWGIT_ORIGIN/$hotfix_fullname'? [y/N] "); read answer
[ "$answer" != "Y" ] && [ "$answer" != "y" ] && die 'Merge into current release aborted!'
fi
feature_fullname="$current_branch"
Expand Down
4 changes: 2 additions & 2 deletions inc/twgit_release.inc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ function cmd_start () {
release=$(get_next_version $type)
echo "Release: $TWGIT_PREFIX_RELEASE$release"
if ! isset_option 'I'; then
echo -n $(CUI_displayMsg question 'Do you want to continue? [Y/N] '); read answer
echo -n $(CUI_displayMsg question 'Do you want to continue? [y/N] '); read answer
[ "$answer" != "Y" ] && [ "$answer" != "y" ] && die 'New release aborted!'
fi
fi
Expand Down Expand Up @@ -317,7 +317,7 @@ function cmd_merge-demo () {
CUI_displayMsg processing "Remote release '$release_fullname' detected."
twgit release start $release

echo -n $(CUI_displayMsg question "$demo_fullname merge to $release_fullname. Do you want to continue? [Y/N] "); read answer
echo -n $(CUI_displayMsg question "$demo_fullname merge to $release_fullname. Do you want to continue? [y/N] "); read answer
[ "$answer" != "Y" ] && [ "$answer" != "y" ] && die 'Merge demo aborted!'

# Merge de la demo dans la release
Expand Down
4 changes: 2 additions & 2 deletions makefile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ install_completion () {
echo ""
echo "2 - Install completion"

echo "Do you want to install the completion ? [Y/N]"
echo "Do you want to install the completion ? [Y/n]"
read answer
if [ "${answer}" != "Y" ] && [ "${answer}" != "y" ]; then
echo "(i) Skip"
Expand Down Expand Up @@ -177,7 +177,7 @@ install_prompt () {
if [ $(cat ${BASH_RC} | grep -E "\.bash_twgit" | grep -vE '^#' | wc -l) -gt 0 ]; then
echo "Colored Git prompt already loaded by '${BASH_RC}'."
else
echo "Add colored Git prompt to '${BASH_RC}' ? [Y/N] "
echo "Add colored Git prompt to '${BASH_RC}' ? [Y/n] "
read answer
if [ "${answer}" = "Y" ] || [ "${answer}" = "y" ]; then
echo "Install git prompt: ${USER_HOME}/.bash_twgit"
Expand Down