Hello,

While studying the `ksh(1)` manual on OpenBSD 7.6,
I noticed that the example under the "case" statement section reads:

  case $foo { *) echo bar; }

This example technically works only because the pattern-action pair
is the final (and only) one, and thus the terminating `;;` is optional
in this specific case.

However, I believe the example may be slightly misleading
for readers who might assume that a single semicolon is always sufficient.
A more robust example might include the `;;`, and perhaps
a short note could clarify that the semicolon(s) are optional **only**
after the final pattern.

Suggested change:

  case $foo { *) echo bar ;; }

And/or add a line like:

  Note that `;;` is required between pattern-action pairs,
but may be omitted or replaced with a single semicolon
on the final pattern.

I’m a beginner and amateur user who’s currently just learning
and playing with OpenBSD, and I truly appreciate the clarity
and consistency of the documentation. Just wanted to try
and give a small contribution in return.

Thank you for your great work.

Best regards, 
Tom

Reply via email to