From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: Re: autoload +X[zk]
Date: Tue, 28 Mar 2000 13:52:38 +0200 (MET DST) [thread overview]
Message-ID: <200003281152.NAA14996@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: Sven Wischnowsky's message of Tue, 28 Mar 2000 13:40:32 +0200 (MET DST)
I wrote:
> ...
>
> This works by storing a flag in the eprog for the file read that will
> make doshfunc() recurse to execute the function once again on the
> first call. Most of the patch just turns the `alloc' field of the
> eprog struct into a `flags' field and ensures that the call to the
> function (which isn't really in the wordcode) is printed at the end.
>
> Note also the handling of the positional parameters. For the first
> call (i.e.: when the init code from the file is executed) they are not
> set. Only for the appended function call are they set up. This is the
> behaviour the ksh I have here shows.
I wrote that last paragraph after I had written the other stuff and
then tested ksh.
Damn. That doesn't work, because the printing functions just output
`foo "$@"' for the not-really-existing call. Hm. What are we supposed
to do here? Handle positional parameters differently? Output a special
comment as for the other function flags (but that doesn't work with
$functions, but the eprog flag is lost there anyway) or... use another
special option for autoload (but that wouldn't work for $functions
either because that flag-losing thing).
With `work for $functions' I mean: eval "foo() { $functions[foo] }" or
some such.
Bye
Sven
--
Sven Wischnowsky wischnow@informatik.hu-berlin.de
next reply other threads:[~2000-03-28 11:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-03-28 11:52 Sven Wischnowsky [this message]
2000-03-28 14:10 ` Sven Wischnowsky
2000-03-28 18:27 ` Bart Schaefer
-- strict thread matches above, loose matches on Subject: below --
2000-03-28 11:40 Sven Wischnowsky
2000-03-27 11:27 Sven Wischnowsky
2000-03-27 10:49 Sven Wischnowsky
2000-03-27 16:48 ` Bart Schaefer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200003281152.NAA14996@beta.informatik.hu-berlin.de \
--to=wischnow@informatik.hu-berlin.de \
--cc=zsh-workers@sunsite.auc.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).