Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Message-ID: <001001c31349$9e8b1040$78d96f83@pomello>
From: "Max Bowsher" <maxb@ukf.net>
To: <cygwin@cygwin.com>, "Randall R Schulz" <rschulz@sonic.net>
References: <NGBBLLIAMFLGJEOAJCCEIEEOCPAA.garbage_collector@telia.com> <5.2.1.1.2.20030505132815.04df07a0@pop.sonic.net>
Subject: Re: skel ~/.bashrc (was RE: HOME)
Date: Mon, 5 May 2003 22:02:20 +0100
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165

Randall R Schulz wrote:
> Hannu, Max,
>
> Aliases permit no manipulation of arguments or anything but simple
> left-hand expansion of the alias name with a fixed replacement string.
>
> Shell procedures are as flexible as scripts and don't require file access.
>
> Don't forget to use "return" in place of "exit" in shell procedures!

But that doesn't really make the *preferable*, if all you want to do is
simple expansion of the alias name.

I'm having to write alias-type things as functions, just so I can export
them and use them in scripts.


Max.

> At 13:20 2003-05-05, Max Bowsher wrote:
>> Hannu E K Nevalainen (garbage mail) wrote:
>>
>>> $ info Bash # says that shell functions are preferable to aliases...
>>>   anyone who can explain?
>>
>> Well, I prefer shell functions because I can export them to subshells,
>> whereas aliases don't permit that.



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

