docs/149047: tcsh(1) bears no mention of brace expansion in case labels

Andres Perera andres.perera at zoho.com
Wed Jul 28 20:30:10 UTC 2010


>Number:         149047
>Category:       docs
>Synopsis:       tcsh(1) bears no mention of brace expansion in case labels
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-doc
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jul 28 20:30:09 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Andres Perera
>Release:        FreeBSD 8.0-RELEASE-p4 i386
>Organization:
>Environment:
System: FreeBSD pote.example.com 8.0-RELEASE-p4 FreeBSD 8.0-RELEASE-p4 #0: Mon Jul 12 20:22:27 UTC 2010 root at i386-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC i386


	
>Description:
The man page explains that variable expansion and filename
substitution characters are allowed within `case:' labels in `switch'
clauses, but does not mention brace expansion.

As a result, many tcsh scripts show awkward statements such as:

	case foo:
	case bar:
		breaksw;

instead of a more idiomatic approach:

	case {foo,bar}:
		breaksw;

>How-To-Repeat:
	
>Fix:

--- /usr/src/contrib/tcsh/tcsh.man	2009-07-11 01:05:08.000000000 -0430
+++ tcsh.man	2010-07-24 20:36:59.000000000 -0430
@@ -3324,7 +3324,7 @@
 .B endsw
 Each case label is successively matched, against the
 specified \fIstring\fR which is first command and filename expanded.
-The file metacharacters `*', `?' and `[...]'  may be used
+The file metacharacters `*', `?', `{...}' and `[...]'  may be used
 in the case labels, which are variable expanded.  If none
 of the labels match before a `default' label is found, then
 the execution begins after the default label.  Each case

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-doc mailing list