看起来不可能中止菜单项内容,例如:
submenu test1 {
menuentry test2 {
echo "play1"
cmd1 # even this failed, it still continue to next line
echo "play2"
return 1 # this also does not work
exit # this works but it exit the entire grub
echo "play3"
}
}
我想要的类似于set -e
bash,但只返回上一个菜单。我该如何实现?