Re: bash function/alias question

From: Bill Marcum (bmarcum_at_iglou.com.urgent)
Date: 06/27/05


Date: Mon, 27 Jun 2005 14:08:56 -0400

On Mon, 27 Jun 2005 09:53:03 -0700, Eric Taylor
  <et1@rocketship1.com> wrote:
> I am having a problem with an alias to a function.
> The script atest is chmod +x and if run as a "program"
> instead of sourced, it fails. Is this a bash bug?
>
No, it's a feature. Functions and aliases are part of the current
environment, and a program can't change its parent's environment.

-- 
Support Our Oops!


Relevant Pages

  • Re: Help with package
    ... that puts all instances of a given environment at the end of the ... The only small problem that I have is that it fails when ... this is the standard trick of using delimited args to see if a string is ...
    (comp.text.tex)
  • 2.6.18-rc2 allyesconfig doesnt build - undefined references to hdlc_set_carrier
    ... Just tried an allyesconfig build of 2.6.18-rc2 and it fails with this error: ... Some info about my environment: ... Kind regards, ...
    (Linux-Kernel)
  • Re: I had to laff.
    ... >> disorder and like many such people, changes in the environment like ... >> altering the shape of a telly cause him distress. ... >> with alias after alias, he posts deranged nonsense attacking widescreen. ... >> needs help. ...
    (uk.tech.digital-tv)
  • Re: Intercepting data from a COM port?
    ... the WDK contains a compiler and all the samples you would need and a command line build environment. ... it does not include a code editor though, but you can easily use any editor you want. ... Please do not send e-mail directly to this alias. ...
    (microsoft.public.development.device.drivers)
  • Re: command to add filesystems size
    ... > it a function which allows you a little more flexibility. ... > you the total function in your current environment. ... > Alloc: 1900.00 ... > A lot more flexible than having one alias for each of them. ...
    (comp.sys.hp.hpux)