🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #12911

Re: ARexx current directory woes

#12911
From: Larry Phillips
Date: Sun, 28 May 1989 16:45
41 lines
2079 bytes
In <0667.AA0667@chroma>, bryan@chroma.UUCP (Bryan Ford) writes:
> Is  there  an easy fix for ARexx's current-directory problem (not giving it
> to  the  ARexx  process  when  RX  is run)?  I know you could just pass the
> current  directory  to  the  script  as an argument, but that looks bad and
> seems  messy  and  is slow.  Does WShell fix this?  Would it be possible to
> write  a  replacement  for  the  RX  command  which  would pass the current
> directory?  (I'll try making one if nothing easier and better comes up.)

The next revision of ARexx will have a vastly improved current directory
inheritance mechanism. Meanwhile, one solution is through the use of the
pragma() keyword.

	/* example */

	parse arg root

	if words(root) = 0 then root = pragma('d')

	say showdir(root)

	/* end */

This is still not overly pretty, but at least it's hidden inside the program,
and saves you the ugliness of specifying current dir on the command line.

> Please E-MAIL only.  (Unless mail doesn't go through, of course.) I'll post
> a summary.  Also, if this has been discussed before, forgive me, I just got
> back on Usenet less than a month ago.

I have posted this because I think it's of general interest. Please don't let
that stop you from posting any other solutions you might receive.

-larry

--
  - Don't tell me what kind of a day to have! -
+----------------------------------------------------------------------+ 
|   //   Larry Phillips                                                |
| \X/    lphillips@lpami.wimsey.bc.ca or uunet!van-bc!lpami!lphillips  |
|        COMPUSERVE: 76703,4322                                        |
+----------------------------------------------------------------------+
Technical Details
Message-ID: <2444@van-bc.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!van-bc!root

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!van-bc!root
From: lphillips@lpami.wimsey.bc.ca (Larry Phillips)
Newsgroups: comp.sys.amiga.tech
Subject: Re: ARexx current directory woes
Message-ID: <2444@van-bc.UUCP>
Date: 28 May 89 16:45:41 GMT
Sender: root@van-bc.UUCP
Lines: 41