zsh-workers
 help / color / mirror / code / Atom feed
* Re: Style mechanism discussion
@ 1999-12-10  8:07 Sven Wischnowsky
  0 siblings, 0 replies; 3+ messages in thread
From: Sven Wischnowsky @ 1999-12-10  8:07 UTC (permalink / raw)
  To: zsh-workers


Bart Schaefer wrote:

> On Thu, 9 Dec 1999, Peter Stephenson wrote:
> 
> > Sven Wischnowsky wrote:
> > > Another question is whether we should at least try to group the styles 
> > > in some sensible way. Probably even using subsections. Opinions?
> > 
> > As long as they've got obvious names, I don't think it matters.  Calling
> > things e.g. section.foo and section.bar is only better than foo and bar if
> > section is really adding to the information, and even in that case it's
> > probably easier just to change the name to section_foo and section_bar ---
> > I don't think use of different namespaces is really necessary here.  Unless
> > I've missed the point of this.
> 
> I think Sven is talking entirely about organizing the documentation into
> sections, not renaming the styles themselves.

That's what I meant. Putting things together that belong together.
Like auto-description+format+verbose or the styles that are now used
on a per-group or per-match basis. Should also make it easier to
document how they are used without repeating it too often.

I haven't really tried to categorize them yet, though.

Bye
 Sven


--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Style mechanism discussion
  1999-12-09 23:47 ` Style mechanism discussion Peter Stephenson
@ 1999-12-10  1:06   ` Bart Schaefer
  0 siblings, 0 replies; 3+ messages in thread
From: Bart Schaefer @ 1999-12-10  1:06 UTC (permalink / raw)
  To: zsh-workers

On Thu, 9 Dec 1999, Peter Stephenson wrote:

> Sven Wischnowsky wrote:
> > Another question is whether we should at least try to group the styles 
> > in some sensible way. Probably even using subsections. Opinions?
> 
> As long as they've got obvious names, I don't think it matters.  Calling
> things e.g. section.foo and section.bar is only better than foo and bar if
> section is really adding to the information, and even in that case it's
> probably easier just to change the name to section_foo and section_bar ---
> I don't think use of different namespaces is really necessary here.  Unless
> I've missed the point of this.

I think Sven is talking entirely about organizing the documentation into
sections, not renaming the styles themselves.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Style mechanism discussion
  1999-12-09 10:35 PATCH: cleanup Sven Wischnowsky
@ 1999-12-09 23:47 ` Peter Stephenson
  1999-12-10  1:06   ` Bart Schaefer
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Stephenson @ 1999-12-09 23:47 UTC (permalink / raw)
  To: zsh-workers

Sven Wischnowsky wrote:
> Another question is whether we should at least try to group the styles 
> in some sensible way. Probably even using subsections. Opinions?

As long as they've got obvious names, I don't think it matters.  Calling
things e.g. section.foo and section.bar is only better than foo and bar if
section is really adding to the information, and even in that case it's
probably easier just to change the name to section_foo and section_bar ---
I don't think use of different namespaces is really necessary here.  Unless
I've missed the point of this.

> 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'?)

These sound like good possibilities.  Maybe we could even have our
long-awaited improved interface to shell options via an `:option' set of
styles.  But we would need to keep the current option interface, too: it
would be a very nasty change otherwise and make zsh completely unlike other
shells.  This would limit the behaviour of the new interface just to be a
front-end to option setting.  Even that's probably quite useful.

> 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.

Perhaps it's easiest just to have zstyle and specify the utility
explicitly, i.e.

  zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}

etc., avoiding proliferating commands of any kind.  As long as the styles
don't overlap between utilities, the `:completion' is redundant with the
`*' already in front; and if styles do overlap between utilities, we should
probably try and make them do consistent things anyway.  For example, the
host/user name styles in completion could probably be re-used in zftp.

Of course, you would need to be careful to make sure things like

  compstyle ':(correct(|-word)|approximate)' accept '2n'

got converted properly, putting :completion in front.  Maybe there's a way
of making the behaviour of the tags hierarchy more transparent, but I don't
see it since it's different in different contexts (which is really exactly
why it's there).

-- 
Peter Stephenson <pws@pwstephenson.fsnet.co.uk>


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1999-12-10  8:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-12-10  8:07 Style mechanism discussion Sven Wischnowsky
  -- strict thread matches above, loose matches on Subject: below --
1999-12-09 10:35 PATCH: cleanup Sven Wischnowsky
1999-12-09 23:47 ` Style mechanism discussion Peter Stephenson
1999-12-10  1:06   ` Bart Schaefer

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).