On Sat, Aug 09, 2025 at 03:10:20PM -0400, Thomas Dickey wrote: > On Sat, Aug 09, 2025 at 01:22:20PM -0500, Parzival Wolfram wrote: .. > > workings, and it claims to be unable to find the terminal database (status = > > -1) despite being usable by other programs. (Additionally, I may have to > > submit a patch or two later, as only ncurses and tack have died on configure > > due to using case statements with non-standard parenthesis.) > > (puzzled what you're testing if the configure fails...) > > Actually that's POSIX standard. > > https://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_09_04_05 > > The page is 2004, but I recall the feature was standardized several years > before _that_. I've been using the feature for about ten years.
The rationale (still 2004): The Open Group Base Specifications Issue 6 IEEE Std 1003.1, 2004 Edition https://pubs.opengroup.org/onlinepubs/009695399/xrat/xcu_chap02.html An optional left parenthesis before pattern was added to allow numerous historical KornShell scripts to conform. At one time, using the leading parenthesis was required if the case statement was to be embedded within a "$()" command substitution; this is no longer the case with the POSIX shell. Nevertheless, many historical scripts use the left parenthesis, if only because it makes matching-parenthesis searching easier in vi and other editors. This is a relatively simple implementation change that is upwards-compatible for all scripts. fwiw, HPUX and AIX from ~25 years ago provided this feature. > Solaris kept using an old /bin/sh -- Thomas E. Dickey <[email protected]> https://invisible-island.net
signature.asc
Description: PGP signature
