Bug 1002078

Summary: man page doesn't reflect change in extglob behaviour
Product: [Fedora] Fedora Reporter: Filip Krska <fkrska>
Component: bashAssignee: Ondrej Oprala <ooprala>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 19CC: admiller, ooprala, ovasik, tsmetana
Target Milestone: ---Keywords: Documentation, EasyFix, Patch
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1002071 Environment:
Last Closed: 2014-04-01 11:08:59 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 1002071    
Bug Blocks:    

Description Filip Krska 2013-08-28 12:54:53 UTC
+++ This bug was initially created as a clone of Bug #1002071 +++

Description of problem:

Manual doesn't reflect the extglob behaviour change introduced in bash 4.1, described in CHANGES:

s.  Force extglob on temporarily when parsing the pattern argument to
    the == and != operators to the [[ command, for compatibility.

Version-Release number of selected component (if applicable):

bash-4.1.2-14.el6.x86_64

How reproducible:

Always

Steps to Reproduce:
1. man bash

Actual results:

       If the extglob shell option is enabled using the shopt builtin, several extended pattern matching operators are recognized.  In the following description, a pattern-list is a list of one or more patterns separated by a |.  Composite patterns may be formed using one or more of the following sub-patterns:

              ?(pattern-list)
                     Matches zero or one occurrence of the given patterns
              *(pattern-list)
                     Matches zero or more occurrences of the given patterns
              +(pattern-list)
                     Matches one or more occurrences of the given patterns
              @(pattern-list)
                     Matches one of the given patterns
              !(pattern-list)
                     Matches anything except one of the given patterns


Expected results:

 Several extended pattern matching operators are recognized.  In the following description, a pattern-list is a list of one or more patterns separated by a |.  Composite patterns may be formed using one or more of the  following  sub-patterns:

              ?(pattern-list)
                     Matches zero or one occurrence of the given patterns
              *(pattern-list)
                     Matches zero or more occurrences of the given patterns
              +(pattern-list)
                     Matches one or more occurrences of the given patterns
              @(pattern-list)
                     Matches one of the given patterns

       If the extglob shell option is enabled using the shopt builtin, following pattern matching operator is recognized as well:

              !(pattern-list)
                     Matches anything except one of the given patterns


Additional info:

--- Additional comment from Filip Krska on 2013-08-28 08:51:30 EDT ---

https://bugzilla.redhat.com/attachment.cgi?id=791383

Comment 1 Fedora Admin XMLRPC Client 2013-10-07 11:48:07 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 2 Ondrej Oprala 2014-04-01 11:08:59 UTC
Hi and thanks for the report.

Yes, that man-page snippet you posted describes the extglob syntax only, as it should.

And since bash-4.2 (which is now in f19 and f20), the implicit extglob with == and != in [[ is also described where it should be - under [[ expression ]].

As for the attachment - effects of shopt extglob should now also be described in numerous places across the manpage.