On 03/19/2014 10:20 AM, Edward Welbourne wrote:
> In the info page for "chmod invocation",
> node 27.2 Symbolic Modes, <quote>
> 
> The format of symbolic modes is:
> 
> [ugoa...][+-=]PERMS...[,...]
> 
> </quote>
> the [+-=] is naturally read as "every character from + through =" due
> to the special meaning of - in a character class.  I suggest [+=-]
> would be more apt.  It is possible the same pattern is repeated
> elsewhere in the manual.

[-+=] was already used in chmod --help so I went with that.
I'll push the attached in your name in a while.

thanks,
Pádraig.

>From 42498f9365db8be8a05a08dad43216989de32167 Mon Sep 17 00:00:00 2001
From: Edward Welbourne <[email protected]>
Date: Wed, 19 Mar 2014 16:19:08 +0000
Subject: [PATCH] doc: avoid regex ambiguity in chmod mode description

* man/chmod.x: s/[+-=]/[-+=]/
* doc/perm.texi (Symbolic Modes): Likewise.
Fixes http://bugs.gnu.org/17041
---
 doc/perm.texi |    2 +-
 man/chmod.x   |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/perm.texi b/doc/perm.texi
index 60e9160..0bccc63 100644
--- a/doc/perm.texi
+++ b/doc/perm.texi
@@ -148,7 +148,7 @@ their previous values, and perhaps on the current @code{umask} as well
 The format of symbolic modes is:
 
 @example
-@r{[}ugoa@dots{}@r{][}+-=@r{]}@var{perms}@dots{}@r{[},@dots{}@r{]}
+@r{[}ugoa@dots{}@r{][}-+=@r{]}@var{perms}@dots{}@r{[},@dots{}@r{]}
 @end example
 
 @noindent
diff --git a/man/chmod.x b/man/chmod.x
index e5372db..190191f 100644
--- a/man/chmod.x
+++ b/man/chmod.x
@@ -16,7 +16,7 @@ which can be either a symbolic representation of changes to make, or
 an octal number representing the bit pattern for the new mode bits.
 .PP
 The format of a symbolic mode is [\c
-\fBugoa\fP.\|.\|.][[\fB+-=\fP][\fIperms\fP.\|.\|.].\|.\|.],
+\fBugoa\fP.\|.\|.][[\fB-+=\fP][\fIperms\fP.\|.\|.].\|.\|.],
 where
 .I "perms"
 is either zero or more letters from the set
-- 
1.7.7.6

Reply via email to