@@ -63,12 +63,26 @@ The ``.stignore`` file contains a list of file or path patterns. The
63
63
64
64
.. note ::
65
65
66
- Escaped characters are not supported on Windows, where ``\ `` is the
67
- path separator. If you still need to match files that have square or
68
- curly brackets in their names, one possible workaround is to replace
69
- them with ``? ``, which will then match any character. For example,
70
- you can type ``?banana? `` to match both ``[banana] `` and
71
- ``{banana} ``, and so on.
66
+ On Windows, ``\ `` is the path separator, so use ``| `` to escape special
67
+ characters. For example, ``|{banana|} `` matches
68
+ ``{banana} ``.
69
+
70
+ To use ``\ `` to escape special characters (and use ``/ `` as the path separator),
71
+ insert a ``#escape=\ `` at the top of the file. Here's a short example:
72
+
73
+ | ``#escape=\``
74
+ | ``/foo``
75
+ | ``/path/bar/\{banana\}``
76
+ | ``/path/baz\[2\]/ex\[3\].txt``
77
+
78
+ ``#escape=\ `` must be placed at the top of the file, before any patterns,
79
+ but leading comments, and blank lines are OK.
80
+
81
+ Any files included using ``#include `` (see below) will each need their
82
+ own ``#escape=\ ``.
83
+
84
+ Using ``#escape=\ `` allows the same file to be synced and used on any
85
+ operating system.
72
86
73
87
- A pattern beginning with ``/ `` matches in the root of the synced folder only.
74
88
``/foo `` matches ``foo `` but not ``subdir/foo ``.
0 commit comments