tobold.org

correct • elegant • free

△ comp.unix.shell △

◅ Basic Text-processing Questions for Bourne Shell

How to rebuild the Rc shell with editline? ▻

Exported aliasses ?

In article <MPG.11b745ad61f19dc7989705@news.surfnet.nl>,
Real <real@earthling.net> wrote:
>Is this as persistent as possible ?  When I 'install' an alias this way
>and invoke a second script, the defined aliases are lost. The same thing
>for exported functions.

Traditional Unix shells either can't do this at all, or require strange
incantations.  In rc, all functions are automatically placed in the
environment, and will be visible to all descendant rc processes.

For example (`; ' is my prompt):

    ; fn hi { echo Hello, world! }
    ; rc -c hi
    Hello, world!

Tim.
--
Tim Goodwin   | `I can't believe that someone is releasing
University of | something called "Unix" without something
Leicester, UK | called "/bin/sh".' -- Randal L. Schwartz

Original headers:

From: tjg@ltpcg.star.le.ac.uk (Tim J Goodwin)
Newsgroups: comp.unix.shell
Subject: Re: Exported aliasses ?
Date: 27 May 1999 12:31:06 +0100
Organization: University of Leicester, UK
Message-ID: <7ijadq$3lb$1@ltpcg.star.le.ac.uk>
References: <MPG.11b4c7382ca5c1c2989703@news.surfnet.nl>
  <7ihc9s$40d$1@nnrp1.deja.com> <7ihk9m$p39$2@magnum.mmm.com>
  <MPG.11b745ad61f19dc7989705@news.surfnet.nl>

△ comp.unix.shell △

◅ Basic Text-processing Questions for Bourne Shell

How to rebuild the Rc shell with editline? ▻