December 28, 2006
http://d.puremagic.com/issues/show_bug.cgi?id=759

           Summary: rdmd does not accept "*.d" or "name.d" as program
                    argument
           Product: D
           Version: 0.178
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla@digitalmars.com
        ReportedBy: MaassG@web.de


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;
}


-- 

November 26, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=759


Andrei Alexandrescu <andrei@metalanguage.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |andrei@metalanguage.com
         Resolution|                            |FIXED


--- Comment #1 from Andrei Alexandrescu <andrei@metalanguage.com> 2010-11-26 14:00:24 PST ---
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.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------