Score:1

is it possible to go back one level depends on some condition in grub menuentry?

de flag

It looks like it is not possible to abort a menuentry content, for example:

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"
  }
}

What I want is similar to set -e in bash, but only return to previous menu. How can I achieve this?

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.