zsh-workers
 help / color / mirror / code / Atom feed
From: Felix Rosencrantz <f_rosencrantz@yahoo.com>
To: zsh-workers <zsh-workers@sunsite.auc.dk>
Subject: Re: Completing parameter names that have yet to be set.
Date: Wed, 6 Sep 2000 00:00:48 -0700 (PDT)	[thread overview]
Message-ID: <20000906070048.11008.qmail@web1103.mail.yahoo.com> (raw)

Way back in August in workers/12608,  Sven Wischnowsky wrote:

>> ...
>> 
>> It seems that the ability to configure styles based on additional
>> information not found in the context requires the ability to treat a
>> group of styles as a single whole, and quickly set/unset a group of
>> styles.  I vaguely remember something like this was talked about, but
>> don't remember what was decided.
>
>I only said several times that I would wish I had an idea how to do
>that ;-)
>
>This kind of feeling comes from the times when I wished we had easy
>ways to support multiple sets of <insert-your-favorite-feature>,
>e.g. histories, key bindings, etc.


So I took a quick look at Src/Modules/zutil.c which implements zstyle.  It
looks like all the styles are held in a list pointed to by the static global
"zstyles".

It seems like it wouldn't be too hard to be able to maintain multiple lists
that the value of zstyles could then be pointed to.  The multiple lists could
be stored as the values in a hash table, the keys would be the names of these
lists.

There would need to be user command(s) to set the name of the current list, get
the names of the lists, set the name of the current list.  To edit a zstyle
list, you need to make that the current list pointed to by zstyles.

Seems like something like that would allow having multiple configuration sets,
and being able to quickly change them.  And wouldn't require too many changes
to the existing source code.

How does that seem?  Useful? Easy to implement or are there a lot of issues I
missed?

Also, I while looking at zutil.c, I noticed that the function evalstyle() only
modifies the existence of the parameter reply.  Would it be useful to provide
a parameter that said what the current context is?  It seems it might
make it possible to write some generic functions that could be given
to a "zstyle -e" and make some decisions based on the context.  The current
context can be different from the context supplied to the zstyle command.  The
context provided to the zstyle command could be a pattern.

Maybe I need to get some rest... :)

-FR


__________________________________________________
Do You Yahoo!?
Yahoo! Mail - Free email you can access from anywhere!
http://mail.yahoo.com/


             reply	other threads:[~2000-09-06  7:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-09-06  7:00 Felix Rosencrantz [this message]
  -- strict thread matches above, loose matches on Subject: below --
2000-09-06  7:41 Sven Wischnowsky
2000-08-14  8:03 Sven Wischnowsky
2000-08-14  8:01 Sven Wischnowsky
2000-08-14  5:51 Felix Rosencrantz
2000-08-14  7:15 ` Bart Schaefer
2000-08-11  7:54 Sven Wischnowsky
2000-08-11  6:30 Felix Rosencrantz

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=20000906070048.11008.qmail@web1103.mail.yahoo.com \
    --to=f_rosencrantz@yahoo.com \
    --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).