← Back to index
|
Original Bugzilla link
Bug 759 – rdmd does not accept "*.d" or "name.d" as program argument
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Linux
Creation time
2006-12-28T05:06:00Z
Last change time
2014-02-15T13:19:40Z
Keywords
rejects-valid
Assigned to
nobody
Creator
MaassG
Comments
Comment #0
by MaassG — 2006-12-28T05:06:25Z
but takes it misleadingly for the program itself. ------------------------------------------ demo prog ------------------------------------------ #!/usr/bin/env rdmd import std.stdio; import std.file; int main(char[][] args){ if( args.length < 2 ){ writefln( "usage: listdir <directory> <pattern>" ); return 1; } foreach( uint i, char[] arg; args ){ if( i>0 ) writefln( "arg %2.2d: %s", i, arg ); } char[][] dirs = void; if( args.length > 2 ) dirs = listdir( args[1], args[2] ); else dirs = listdir( args[1] ); dirs.sort; foreach (d; dirs) writefln( "%s", d ); writefln( "count: %d", dirs.length ); return 0; }
Comment #1
by andrei — 2010-11-26T14:00:24Z
Tried the example (after fixing for D2) with: $ rdmd test.d . $ rdmd test.d . '*.d' $ ./test.d . $ ./test.d . '*.d' $ mkdir -p name.d $ rdmd test.d name.d $ ./test.d name.d All work as expected.