提交 93e7a150 authored 作者: xiaobai's avatar xiaobai

1

上级 a4b46a5c
...@@ -200,7 +200,7 @@ set_branches(){ ...@@ -200,7 +200,7 @@ set_branches(){
else else
# 验证输入是否为有效的数字 # 验证输入是否为有效的数字
if [[ "$input" =~ ^[0-9]+$ ]] && (( input >= 1 && input <= branch_count )); then if [[ "$input" =~ ^[0-9]+$ ]] && (( input >= 1 && input <= branch_count )); then
selected_branch=$(echo "$branches" | sed -n "${input}p") selected_branch=$(echo "$branches" | sed -n "${input}p" | xargs)
echo_content "green" "你选择了分支: $selected_branch" echo_content "green" "你选择了分支: $selected_branch"
# 切换到选定分支 # 切换到选定分支
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论