Enhanced FUNCTION and ALIAS definition syntax

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
#1
Often one wants to define a function that cannot be defined in a single
string. This can currently be done only by writing a batch file, and return
the value it generates via @EXECSTR[], e.g.

function jpv=`%@execstr[jpv %1]`

If the above function is used as a reporting field in PDIR /S, there is a
heavy overhead associated with such a definition. What I am looking for is a
method whereby the whole batch file would be stored in the function table.
Restricting the use of such definitions to "function definition files"
(i.e., files loaded by the FUNCTION /R option) should not be a burden, since
the batch file would have to be written anyway.

A similar situation exists for aliases, though it is much less severe. An
alternative syntax to just using command groups and command separators would
be beneficial.

Last but not least, the use of DO iteration in aliases and functions would
be very useful, even if doing it at the command prompt is not feasible.
--
Steve