Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
More questions (was: Re: PATCH: menu style AND remarks)
- X-seq: zsh-workers 8969
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: More questions (was: Re: PATCH: menu style AND remarks)
- Date: Thu, 9 Dec 1999 12:57:38 +0100 (MET)
- In-reply-to: Sven Wischnowsky's message of Wed, 8 Dec 1999 14:43:55 +0100 (MET)
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
I wrote:
> ... (e.g. by moving some stuff from computil into a general
> utility module -- some things in it, like the style stuff, is really
> completely independent of the completion system).
I thought some more about this... and now I'm beginning to like it.
I would suggest to move comp{display,fmt,styles} into a separate
module (compstyles is the builtin behind _style and compstyle; ugly
name; that's one of the reasons why I'd like to replace it with
something more sensible). The first two would be combined to, say,
`zformat' (both do only some formatting, compdisplay does the
alignment used in displays and compfmt does the %c stuff -- the latter
could do with some more work to support the field width stuff and so on).
And compstyles would be renamed to, say, `zstyle'. This, too, would be
enhanced a bit so that _style isn't necessary anymore, completion
functions would just call zstyle directly, making things faster.
We probably should then also built the listing stuff into it. At least
for now the `compstyle' would still survive, but only act as a very
simple wrapper around zstyle (probably simpler than it is now).
The completion code would use names of the form `:completion:...' and
stuffing that `:completion' in front would be the main task of
`compstyle'. If styles are used elsewhere, they would use different
prefixes (`:prompt'? `:zftp'?) and probably their own *style functions
unless we decide to only use the builtin (i.e. all styles, independent
of the package-prefix) everywhere -- then compstyle would/could/should
be removed, too. I can only see a small problem here: if we don't use
per-package style functions, we might some time come to a point where
we want to make zstyle more convenient or make it know some more about
packages really used. Then we would want to use a (one) shell function
as a wrapper around the builtin and `zstyle' would be a nice name for
it, too. But since stuff like the completion functions would use the
builtin, too, we would have to give it a different name than the
builtin (I want to avoid having to use `builtin zstyle' everywhere).
In short: in this case we probably should use a different name for the
builtin and somewhere (but where?) already define the wrapper function
for the user interface named `zstyle'.
Hm, I hope at least some of you understood what I wanted to say. If
so: any suggestions/opinions?
Bye
Sven
--
Sven Wischnowsky wischnow@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author