$submenu, 'end' and empty popup - 10/11/22 12:38 AM
Code
menu status { test .test ..$submenu($subtest($1)) } alias subtest { echo -sg $1 if ($1 isin 1begin) return if ($1 == 2) return return $1 : echo -sg cmdfrompopup $1 }
The above code will execute /return for both "begin" but especially "1", making $submenu's next call the "end", in which case "return $1 : echo -sg cmdfrompopup $1" is returned, but is never displayed.
Change "1begin" to "begin" so that the iteration with "1" result in a valid menu item from the "/return $1 : echo -sg ..", making then the "2" iteration an empty /return, which then makes the next iteration "end". But this time, the "end" menu item shows up.