File: c_wild.so

package info (click to toggle)
lookup 1.08b-5
  • links: PTS
  • area: contrib
  • in suites: woody
  • size: 1,108 kB
  • ctags: 1,305
  • sloc: ansic: 12,634; makefile: 236; perl: 174; sh: 53
file content (63 lines) | stat: -rw-r--r-- 1,388 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
.TP
[default] wildcard [\fIboolean\fP]
.br
The
.IR "selected slot" "'s"
patterns are considerd wildcard patterns if turned on, regular expressions
if turned off. The current status is reported if no argument given.
However, if\c
.Q default
is specified, the pattern-type to be inherited as the default by
subsequently-loaded files is set (or reported).

Can be temporarily toggled by the\c
.Q "!W!"
line prefix.

When wildcard patterns are selected, the changed metacharacters are:\c
.Q "*"
means\c
.Q "any stuff" ,
.Q "?"
means\c
.Q "any one character" ,
while\c
.Q "+"
and\c
.Q "."
become unspecial. Other regex items such as\c
.Q "|" ,
.Q "(" ,
.Q "[" ,
etc. are unchanged.

What\c
.Q "*"
and\c
.Q "?"
will actually match depends upon the status of word-mode, as well as on the
pattern itself.  If word-mode is on, or if the pattern begins with the
start-of-word\c
.Q "<"
or\c
.Q "[" ,
only non-spaces will be matched. Otherwise, any character will be matched.

In summary,when wildcard mode is on, the input pattern is effected in the
following ways:
.nf

   * is changed to the regular expression .* or \S*
   ? is changed to the regular expression . or \S
   + is changed to the regular expression \+
   . is changed to the regular expression \.

.fi


Because filename patterns are often called\c
.Q "filename globs" ,
the command\c
.Q glob
can be used in place of\c
.Q wildcard .