zsh-workers
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>,
	zsh-workers@sunsite.auc.dk
Subject: Re: Default fpath
Date: Wed, 15 Mar 2000 18:15:05 +0000	[thread overview]
Message-ID: <1000315181505.ZM23749@candle.brasslantern.com> (raw)
In-Reply-To: <200003151557.QAA27085@beta.informatik.hu-berlin.de>

On Mar 15,  4:57pm, Sven Wischnowsky wrote:
} Subject: Re: Default fpath
}
} Bart Schaefer wrote:
} > Hmm, maybe autoload should have the `k' and `z' opts,
} > too, but they only work with +X (the load-it now option).  That would
} > fix something that's been bugging me for a while.
} 
} I haven't added that for autoload yet and there is another thing:
} loadautofn() should probably make use of this too, maybe execute the
} Eprog it gets from getfpfunc() when it knows that the function should
} be ksh-autoloaded (either because the dump file said so or because
} `autoload +x' said so). But then, it doesn't do that if KSHAUTOLOAD is 
} set. I guess that's some security issue?

It's not exactly a security issue; that's the "something that's been
bugging me for a while."

Autoload +X is supposed to promise that the autoloaded function is not
executed.  Unfortunately, in the kshautoload style, you have to execute
the code in order to get the function defined, which may mean executing
other code that's in the file but not inside any function body.

For at least one intended use of "autoload +X" -- finding out whether
the function is in fpath and is syntactically correct -- other code in
the file should NOT be executed; rather, you want the effect of the
`[[ -o kshautoload ]] && run-myself "$@"' trick to take effect at the
time an actual *call* to the function is made.

At the time that I added loadautofn() there wasn't any way to achieve
that result, but perhaps now with wordcode it'll be possible.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com


  reply	other threads:[~2000-03-15 18:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-03-15 15:57 Sven Wischnowsky
2000-03-15 18:15 ` Bart Schaefer [this message]
  -- strict thread matches above, loose matches on Subject: below --
2000-03-15  9:32 Sven Wischnowsky
2000-03-14 10:19 Sven Wischnowsky
2000-03-14 17:55 ` Bart Schaefer
2000-03-13 10:42 Sven Wischnowsky
2000-03-13 16:52 ` Bart Schaefer
2000-03-11 21:29 Oliver Kiddle
2000-03-11 23:46 ` 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=1000315181505.ZM23749@candle.brasslantern.com \
    --to=schaefer@candle.brasslantern.com \
    --cc=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).