Page MenuHomeFreeBSD

sh.1: Renew description of case
Needs ReviewPublic

Authored by ziaee on Wed, Sep 9, 6:55 AM.

Details

Summary

Case explaination is quite out of date.
I studied what openbsd and netbsd are doing, and try to fix it.

  • show the optional left parenthesis and optional list
  • explain there can be a space or not after the pattern
  • use markup
  • split the paragraphs
  • remove totally unnecessary actually (akshually)
  • import the exit status line from netbsd

While here, remove the '-' from the beginning of this document.

PR: 298329
Fixes: c9afaa63894e ("Add case statement fallthrough")
Fixes: f7a9b7fe3a8d ("Allow a left parenthesis before patterns in case blocks")
Fixes: e00e16ad7f86 ("Allow empty case/esac statements")
MFC after: 3 days

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 76682
Build 73565: arc lint + arc unit