aboutsummaryrefslogtreecommitdiff
path: root/bin/sh/sh.1
diff options
context:
space:
mode:
authorJilles Tjoelker <jilles@FreeBSD.org>2011-06-15 21:48:10 +0000
committerJilles Tjoelker <jilles@FreeBSD.org>2011-06-15 21:48:10 +0000
commitff4dc67299e62f35d32dfde8915148a86069bd31 (patch)
tree96218b02aec3161b99056c7f828d160ff6dfb2f9 /bin/sh/sh.1
parentd2c60314e4bb79ff12f5c98627ddbdb22ba6cf13 (diff)
downloadsrc-ff4dc67299e62f35d32dfde8915148a86069bd31.tar.gz
src-ff4dc67299e62f35d32dfde8915148a86069bd31.zip
sh: Add support for named character classes in bracket expressions.
Example: case x in [[:alpha:]]) echo yes ;; esac
Notes
Notes: svn path=/head/; revision=223120
Diffstat (limited to 'bin/sh/sh.1')
-rw-r--r--bin/sh/sh.112
1 files changed, 11 insertions, 1 deletions
diff --git a/bin/sh/sh.1 b/bin/sh/sh.1
index 3b7f3d33462e..67ffcc6bcc25 100644
--- a/bin/sh/sh.1
+++ b/bin/sh/sh.1
@@ -32,7 +32,7 @@
.\" from: @(#)sh.1 8.6 (Berkeley) 5/4/95
.\" $FreeBSD$
.\"
-.Dd June 12, 2011
+.Dd June 15, 2011
.Dt SH 1
.Os
.Sh NAME
@@ -1648,6 +1648,15 @@ matches a
rather than introducing a character class.
A character class matches any of the characters between the square brackets.
A range of characters may be specified using a minus sign.
+A named class of characters (see
+.Xr wctype 3 )
+may be specified by surrounding the name with
+.Ql \&[:
+and
+.Ql :\&] .
+For example,
+.Ql \&[\&[:alpha:\&]\&]
+is a shell pattern that matches a single letter.
The character class may be complemented by making an exclamation point
.Pq Ql !\&
the first character of the character class.
@@ -2572,6 +2581,7 @@ will return the argument.
.Xr execve 2 ,
.Xr getrlimit 2 ,
.Xr umask 2 ,
+.Xr wctype 3 ,
.Xr editrc 5
.Sh HISTORY
A