At 10:14 AM -0800 1/18/05, Will Coleda wrote:
To implement tcl's

[info nameofexecutable]

I need to get the name of the exectuable parrot was invoked with. I would
have expected to live in interpinfo, but don't see it there.

Anyone have a pointer to where this is? (If it's not in yet, I'll
add a TODO)

Let's add it as a TODO. Two new interpinfo options -- fullname (which gives the entire executable name as we got it) and basename which gives the name without the path and suffix information.


As an example, if we were invoked as:

    ~/src/parrot/parrot foo.pbc

then fullname would be "~/src/parrot/parrot" and basename would be "parrot". If, on the other hand, we were invoked as:

     parrot foo.pbc

then both fullname and basename would be "parrot". Unix hashbang (and Windows file association) invocation may give us something different -- if the user did:

   ~/src/foo.pasm

and you'd either associated .pasm with parrot, or foo.pasm started "#! /usr/bin/parrot" (which is legal :) then you'd get a fullname of "~/src/foo.pasm" and a basename of "foo".

Clear and sensible?
--
                                Dan

--------------------------------------it's like this-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to