re: Re: FreeCOM feature review: ALIAS

[email protected] Thu, 14 Nov 2002 11:19:28 +0100 (CET)
Newsgroups gmane.os.freedos.devel
Message-ID <[email protected]>
On Mon, 11 Nov 2002, Eric Auer wrote:

> Hi, I think your answer basically means "already works".

No, it's on the list of features to be implemented.

> Ah, so you got special %%1 variables and so on :-).

These are no special, but the usual "batch" argument variables, you have
to use two % signs, to quote them.

> BUT I would propose that all %n arguments with %n not explicitly described
> in the alias to be automatically appended anyway:

No, this would limit the usefullness of /B, that's the %3& syntax for.
Think, what if you have this:

ALIAS /B foo=bar %1 %4

? omit %2 and %3?

> Does FreeCOM have %3& and %# ???

Currently not, it's on the feature _request_ list (I think I forgot to
mention this "request" sub-nuance;)

> If you have 4start and 4end scripts, I could put "call fdalias.bat" in them,
> so I would not need an ".aliases" autoloader anymore. Maybe I misunderstand
> your 4start/4end concept.

No, that's exactly what they are designed for.
You would name 4start ".bashrc", "AUTOEXEC.BAT" ".profile", 4end -- maybe
like .logout in /bin/sh.

> So you will have to explain how you solve the "FreeCOM forms an inpermeable
> border in the PSP process tree" problem that my COUNT3 tool has troubles

_Any_ DOS shell is such border, in fact _any_ DOS program that uses the
kernel's "never terminate me" feature do.

> with. Would be nice for me to know how to pass this border anyway! As said,

It will be documented, of course :)

> I have a batch file which calls a program which calls FreeCOM /c otherbatchfile
> and otherbatchfile must be able to modify the environment of the first batch
> file (or at least the program). But I never get further than the called
> FreeCOM when following the PSP parent chain :-(.

Well, "work around" this problem by using something that's passed on, e.g.
the environment:

=== BATCH1.BAT
mark_env
set BATCH2_VAR=
CALL batch2.bat
echo %BATCH2_VAR%
=== BATCH2.BAT
set_in_marked_env BATCH2_VAR=value
===

"mark_env" would do something like this:
SET ENVSEGM_myUniqueID=segment number

"set_in_marked_env"
would perform a SET-like operation on the segment pointed to by
%ENVSEGM_myUniqueID%.

Bye,

-- 

Steffen Kaiser

The current maintainer of [email protected]
http://freedos.sourceforge.net/freecom/FreeCOM.html