zsh-workers
 help / color / mirror / code / Atom feed
From: Oliver Kiddle <opk@u.genie.co.uk>
To: Zsh workers <zsh-workers@sunsite.dk>
Subject: Re: Moving completion functions
Date: Sun, 25 Mar 2001 16:26:49 +0100	[thread overview]
Message-ID: <3ABE0E39.B74CAB72@u.genie.co.uk> (raw)
In-Reply-To: <010322162918.ZM21205@candle.brasslantern.com>

Bart wrote:

> Long, long ago it was decided that it was a bad idea to import FPATH.
> So long ago that it's not in the zsh-workers archive, unfortunately.
> Probably has something to do with the fact that its a huge security
> hole, i.e., you can cause some other user's shell to inherit a trojan
> via any function you can guess he might autoload.

That's a good point. I have a horrible feeling you mentioned that before
sometime. It made me wonder though: surely PATH is similar. I've always
tended to add to the path in my .zshrc so this makes me wonder if it
wise to set it fully and in .zshenv for similar security reasons.
 
> } As I said with the original suggestion, there could be a variable set
> } to point to the base of the installed functions.
> 
> A parameter set how?  By hardwiring it at compile time?  I suppose that
> the zsh/complete module could define one.

Yes, or in the same way as how $fpath is set. I've used things like
${fpath[(r)*Core]:-$fpath[(r)*/functions]} in a few places (such as my
zrecompile script) to get at this directory so it might be useful
anyway.

I did a bit of thinking last week and as for the whole suggestion about
setting $fpath, I think you've convinced me that the current situation
is probably just as good/bad as my suggestion. I think it would
definitely be worse if we ended up supporting both ways of doing it with
a configure option so I won't mention it again. So I suggest we leave it
as it is and I shut up.

> } Do we need to account for kshautoload though?

> The only way is to "zcompile -z" the whole thing and then put the .zwc
> file in fpath.  This has been mentioned before (it may even be in the
> docs somewhere).

I couldn't see it in the docs but these things aren't so easy to find.
If it gets asked much, we can always add it to the FAQ.

As for sourcing compinit, I suppose it might have a performance
implication. I just felt that sourcing is more natural for what it is
doing and is possibly an easier concept for new users to understand.
>From the perspective of my own use of zsh, I don't really care how
compinit does its stuff. I'm not too keen on us complicating compinit so
that sourcing it is an option but with autoload being the method
mentioned in the manual.

Bart Schaefer wrote:
> 
> I would include harden, checkmail, mere, and definitely zed as "useful
> functions which many people might want to use," but proto is marginal
> (how many people code in C with exactly Paul Falstad's style?) and to
> autoload all those those trivial one-liners is IMO a waste.

Sorry, I didn't really know what proto was but assumed it was something
more general and so more useful.

> It's too big to reasonably put in compctl-examples and remains relevant

fair enough. Again I've never used it and just glanced to see what it
did.

> > > Functions/Misc/run-help             Functions/Misc  # Add #autoload line?
> >
> That's why there's a `?' at the end of my comment.  So, leave run-help
> as it is.

Er? I saw the ? and meant my comment as an answer but probably got the
tone of it wrong.

In some ways, I wonder that #autoload as a wider feature might be
useful.

> I'd actually rather split compctl-examples up into smaller files and put
> them all in Functions/Compctl, but I suppose we're trying to discourage
> use of compctl ...

That's not a bad idea. They'd be out of the way in the Compctl directory
so I don't think it would be too much of an encouragement. More
functions in Compctl would better justify its existence. I've also been
convinced that compctl still serves a purpose.

> The main thing I want to do with the example startup files is to add a
> batch of comments, possibly in all-caps, telling system administrators
> NOT to drop these files into /etc/z*.  And maybe even put a "return 0"
> at the top of each file just in case some nimrod copies them to /etc/
> without looking at them.

I would definitely agree with that.

Oliver


  reply	other threads:[~2001-03-25 16:36 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-03-22 21:46 Oliver Kiddle
2001-03-22 21:50 ` Oliver Kiddle
2001-03-23  0:29 ` Bart Schaefer
2001-03-25 15:26   ` Oliver Kiddle [this message]
2001-03-25 20:39     ` Peter Stephenson
2001-03-25 23:27       ` PATCH: nimrod proofing Bart Schaefer
2001-03-25 23:35         ` Bart Schaefer
2001-03-26  4:33     ` Moving completion functions Bart Schaefer
  -- strict thread matches above, loose matches on Subject: below --
2001-03-30 14:00 Sven Wischnowsky
2001-03-30 15:12 ` Bart Schaefer
2001-03-29  9:33 Sven Wischnowsky
2001-03-29 16:49 ` Bart Schaefer
2001-03-28 14:12 Sven Wischnowsky
2001-03-28 16:14 ` Bart Schaefer
2001-03-28 16:20   ` Peter Stephenson
2001-03-26 14:16 Sven Wischnowsky
2001-03-26  8:53 Sven Wischnowsky
2001-03-22 10:40 Sven Wischnowsky
2001-03-22 11:03 ` Peter Stephenson
2001-03-22 17:04 ` Bart Schaefer
2001-03-21 11:42 Sven Wischnowsky
2001-03-20 21:32 Oliver Kiddle
2001-03-21  9:58 ` Bart Schaefer
2001-03-19  9:46 Sven Wischnowsky
2001-03-22  7:21 ` Bart Schaefer
2001-03-18 22:20 Oliver Kiddle
2001-03-19  4:36 ` Bart Schaefer
2001-03-16 17:27 Oliver Kiddle
2001-03-16 10:20 Sven Wischnowsky
2001-03-18  2:39 ` Bart Schaefer
2001-03-15 20:50 Oliver Kiddle
2001-03-16 12:09 ` Peter Stephenson
2001-03-17 23:16 ` Bart Schaefer
2001-03-15 15:46 Oliver Kiddle
2001-03-15 18:14 ` Bart Schaefer
2001-03-15 10:43 Sven Wischnowsky
2001-03-15  9:30 Sven Wischnowsky
2001-03-15 10:33 ` Peter Stephenson
2001-03-15 17:04 ` 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=3ABE0E39.B74CAB72@u.genie.co.uk \
    --to=opk@u.genie.co.uk \
    --cc=zsh-workers@sunsite.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).