builtin break/continue: support -h/--help argument

These are not generic builtins because we check whether they're inside
a loop. There's no reason to not support "break -h" when we support
"if -h" etc.; do that.
This commit is contained in:
Johannes Altmanninger
2025-09-17 14:49:24 +02:00
parent c77255aabc
commit 87c73b7fbf
4 changed files with 19 additions and 1 deletions

View File

@@ -442,6 +442,15 @@ eval continue
#CHECKERR: Error-message: continue: Not inside of loop
#CHECKERR: Documentation for continue
break -h
#CHECKERR: Documentation for break
break --help
#CHECKERR: Documentation for break
$dyn_break -h
#CHECKERR: Documentation for break
continue -h
#CHECKERR: Documentation for continue
# Test implicit cd. This should do nothing.
./