zsh-workers
 help / color / mirror / code / Atom feed
From: "Mark Hessling" <m.hessling@qut.edu.au>
To: zsh-workers@sunsite.dk
Subject: How to change environment from a module
Date: Sun, 22 Dec 2002 15:24:48 +1000	[thread overview]
Message-ID: <3e054ca0.99775.26970@imap.qut.edu.au> (raw)

I'm writing a fairly simple module that will allow the execution of a Rexx
program within the same process as zsh.
Execution of the Rexx program works fine at the moment, but the main reason
for wanting to run a Rexx program this way is to allow the Rexx program to
make changes to the current environment; ie environment variables and
current working directory.
So, from within the module I have, I need to be able to do the following:
1) Get the current value of an environment variable
2) Set the value of an enviornment variable
3) Get the value of the current working directory
4) Set the value of the current working directory

I thought I might be able to use bin_cd() and bin_typeset() to set the
appropriate values, but at least for bin_typeset() I don't know how to set
up the "options" argument properly. When I call it, I get "invalid
option(s)" error displayed.

So my questions are:
1) Should modules be able to call builtins as described above ?
2) How does one get the values of an environment variable and current
working directory from within a module ? (There aren't really any builtins)

TIA

Cheers, Mark.


             reply	other threads:[~2002-12-22  5:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-22  5:24 Mark Hessling [this message]
2002-12-22 17:57 ` Bart Schaefer
2002-12-29  9:32 Mark Hessling
2002-12-29 19:23 ` Bart Schaefer
2002-12-31  1:16 Mark Hessling
2002-12-31  1:39 ` Zefram

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3e054ca0.99775.26970@imap.qut.edu.au \
    --to=m.hessling@qut.edu.au \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).