bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how are aliases exported?


From: Linda Walsh
Subject: Re: how are aliases exported?
Date: Mon, 16 Apr 2012 02:43:23 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.24) Gecko/20100228 Lightning/0.9 Thunderbird/2.0.0.24 Mnenhy/0.7.6.666



Maarten Billemont wrote:

On 16 Apr 2012, at 09:54, Maarten Billemont wrote:
On 15 Apr 2012, at 22:52, Linda Walsh wrote:
But I want the syntax

include file.shh

to just 'work', i.e. first time, it would call my include file, which defines
the function...
I'm sorry, tell me again why you don't just write "source file.sh" instead of having to 
invent your own "include file.sh"?


I just realized, you appear to be looking for a way to define a "source path" 
to search for the file.

PATH=/foo:/bar:/etc source file

or

PATH=$SOURCEPATH source file

I know it's not as "clean" as "include file", but it's certainly more clear as to what it does.


And clarity is more important, IMO.  Also, it conveniently also doesn't require 
insane hacks.


But it won't work for files below the top level of the library directory.

if I have include system/errno.shh,   Source is crippled to not look in PATH.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]