Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Jul 2010 15:31:44 -0430 (VET)
From:      Andres Perera <andres.perera@zoho.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   docs/149047: tcsh(1) bears no mention of brace expansion in case labels
Message-ID:  <201007282001.o6SK1ieZ031280@pote.example.com>
Resent-Message-ID: <201007282030.o6SKU9rH030297@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
>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@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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201007282001.o6SK1ieZ031280>