From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4053 invoked from network); 9 Dec 1999 11:58:03 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 9 Dec 1999 11:58:03 -0000 Received: (qmail 4110 invoked by alias); 9 Dec 1999 11:57:45 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8969 Received: (qmail 4103 invoked from network); 9 Dec 1999 11:57:43 -0000 Date: Thu, 9 Dec 1999 12:57:38 +0100 (MET) Message-Id: <199912091157.MAA22089@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: Sven Wischnowsky's message of Wed, 8 Dec 1999 14:43:55 +0100 (MET) Subject: More questions (was: Re: PATCH: menu style AND remarks) 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@informatik.hu-berlin.de