argv[0] not available to CLISP programs

Andrew Pennebaker <[email protected]>
Newsgroups gmane.lisp.clisp.devel
Message-ID <CAHXt_SU874jMtmrLU22a6wSSLWYzrwQ5_tt5_WgjHo_4Wxsrgw@mail.gmail.com>
Many CL's offer a way to retrieve the Lisp script name, but CLISP appears
to silently drop this information. I've managed a hack around this, but not
without caveats.

https://github.com/mcandre/scriptname/blob/master/scriptname.lisp

A shebang line forces the script name onto the shell arguments twice,
forcing it into ext:*args*. However, this method only works when the Lisp
script is run with Unix ./ notation (chmod a+x && ./scriptname.lisp), and
the script must be run with CLISP; Thus the script immediately loses
portability to other CL's which require their own shebangs.

Could CLISP please provide an accessor similar to ext:*args* that exposes
argv[0], as a C program would see it? Thank you.

-- 
Cheers,

Andrew Pennebaker
www.yellosoft.us

------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov

_______________________________________________
clisp-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/clisp-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.