Re: [rdiff-backup-users] Re: How to Escape Globbing Patterns?
On Mon, 22 Jan 2007, Dave Howorth wrote: 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. patches welcome. include a man page patch as well. -dean ___ rdiff-backup-users mailing list at rdiff-backup-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/rdiff-backup-users Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki
Re: [rdiff-backup-users] Re: How to Escape Globbing Patterns?
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 ___ rdiff-backup-users mailing list at rdiff-backup-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/rdiff-backup-users Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki