提交 e9c4ef79 authored 作者: xiaobai's avatar xiaobai

1

上级 8fd91620
...@@ -183,11 +183,11 @@ set_branches(){ ...@@ -183,11 +183,11 @@ set_branches(){
if [ "$branch_count" -gt 1 ]; then if [ "$branch_count" -gt 1 ]; then
echo_content "yellow" "$repo_name 项目:分支选择 (如不需要更换直接回车):" echo_content "yellow" "$repo_name 项目:分支选择 (如不需要更换直接回车):"
PS3="请输入分支对应的数字:" PS3="请输入分支对应的数字:"
# 显示分支列表并允许选择 # 显示分支列表并允许选择
select branch in $branches; do select branch in $branches; do
# 检查是否按了回车且不选择任何分支 # 检查是否直接按回车
if [ -z "$branch" ]; then if [ -z "$REPLY" ]; then
# 如果按回车不选择,继续使用当前分支
echo_content "yellow" "继续使用当前分支: $current_branch" echo_content "yellow" "继续使用当前分支: $current_branch"
branch="$current_branch" branch="$current_branch"
break break
...@@ -207,6 +207,7 @@ set_branches(){ ...@@ -207,6 +207,7 @@ set_branches(){
done done
fi fi
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论