File globbing syntax?

4 views
Skip to first unread message

Christopher Granade

unread,
Dec 11, 2006, 6:46:00 PM12/11/06
to metashell-discuss
We should decide what syntax should be used for the filename globbing
described in http://code.google.com/p/metashell/issues/detail?id=17 on
the issue tracker. If we just kind of kluge together what the file glob
syntax is, it will only lead to being harder to maintain later, and to
user frustration in the short-term.

In that spirit, I think that we need to support at least the following
three basic features in the globbing routine:

1) Support the wildcard character (*).
2) Allow for escaping with platform-dependent escape character (\ under
Unix, Posix, etc., who knows what under Windows).
3) List expansion ("{foo,bar}.txt" should resolve to ["foo.txt",
"bar.txt"]).

Of these, I think that (3) would be the hardest. (1) can be handled
with regular expressions, and (2) should probably be moved into the
ProcessLine method.

Reply all
Reply to author
Forward
0 new messages