[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [rdiff-backup-users] Re: How to Escape Globbing Patterns?
From: |
Dave Howorth |
Subject: |
Re: [rdiff-backup-users] Re: How to Escape Globbing Patterns? |
Date: |
Mon, 22 Jan 2007 11:06:49 +0000 |
User-agent: |
Thunderbird 1.5.0.8 (X11/20060911) |
Andrew Price wrote:
> On 12/01/07 11:57, Andrew Price wrote:
>> I'm using --include-globbing-filelist. If I wanted to specify a file in
>> a file list that has [] in the file name, e.g. myfile[foo].txt, how
>> would I escape the square brackets so that they aren't treated as a
>> globbing pattern?
>
> I apologise for "bumping" this thread. Does somebody have an answer to
> the above question? Even if it's "it can't be done, you should work
> around it" it would be helpful to me. I'm just trying to close a bug in
> a project that relates to it. Let me know if the question is worded badly.
I'm new to rdiff-backup and I don't know python, so I'm not sure I'll be
much help, but I guess any answer is better than none. The code that
implements this appears to be in selection.py and it says:
def glob_to_re(self, pat):
"""Returned regular expression equivalent to shell glob pat
Currently only the ?, *, [], and ** expressions are supported.
Ranges like [a-z] are also currently unsupported. There is no
way to quote these special characters.
So I guess the answer is "it can't be done", or rather, "you'll need to
hack this code".
HTH, Dave