bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

file name patterns escaped by insert-directory


From: Kevin Rodgers
Subject: file name patterns escaped by insert-directory
Date: Fri, 18 May 2001 16:35:21 -0600

>From insert-directory in files.el:

              ;; Quote some characters that have special meanings in shells;
              ;; but don't quote the wildcards--we want them to be special.
              ;; We also currently don't quote the quoting characters
              ;; in case people want to use them explicitly to quote
              ;; wildcard characters.
              (while (string-match "[ \t\n;<>&|()#$]" pattern beg)
                (setq pattern
                      (concat (substring pattern 0 (match-beginning 0))
                              "\\"
                              (substring pattern (match-beginning 0)))
                      beg (1+ (match-end 0))))

That incorrectly escapes the parentheses in these file name patterns
supported by bash and ksh, as well as the `|' that separates patterns
within PATTERN-LIST: 

`?(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 exactly one of the given patterns.

`!(PATTERN-LIST)'
     Matches anything except one of the given patterns.

-- 
Kevin Rodgers <address@hidden>          Lead Software Engineer
Information Handling Services           Electronic Systems Development
15 Inverness Way East, M/S A114         GO BUFFS!
Englewood CO 80112-5776 USA             1+ (303) 397-2807[voice]/705-4258[fax]



reply via email to

[Prev in Thread] Current Thread [Next in Thread]