corriger la sélection par défaut

This commit is contained in:
Jephte CLAIN 2015-03-05 20:33:05 +04:00
parent 5084eb747a
commit 76681f423e
1 changed files with 6 additions and 3 deletions

9
pdev
View File

@ -76,8 +76,9 @@ if [ "$action" == branch ]; then
feature=develop feature=develop
else else
array_ins branches develop array_ins branches develop
array_contains branches "$branch" || branch=develop default_branch="$branch"
simple_menu feature branches -d "$branch" \ array_contains branches "$default_branch" || default_branch=develop
simple_menu feature branches -d "$default_branch" \
-t "Basculer vers une feature branch" \ -t "Basculer vers une feature branch" \
-m "Veuillez choisir la branche vers laquelle basculer" -m "Veuillez choisir la branche vers laquelle basculer"
fi fi
@ -124,7 +125,9 @@ if [ "$action" == merge ]; then
feature="${branches[0]}" feature="${branches[0]}"
estepn "Autosélection de $feature" estepn "Autosélection de $feature"
else else
simple_menu feature branches -d "$branch" \ default_feature="$branch"
array_contains branches "$default_feature" || default_feature="${branches[0]}"
simple_menu feature branches -d "$default_feature" \
-t "Choix de la feature branch" \ -t "Choix de la feature branch" \
-m "Veuillez choisir la branche" -m "Veuillez choisir la branche"
fi fi