zsh-workers
 help / color / mirror / code / Atom feed
* Style names
@ 2000-04-04 13:32 Sven Wischnowsky
  2000-04-04 19:31 ` Peter Stephenson
  0 siblings, 1 reply; 5+ messages in thread
From: Sven Wischnowsky @ 2000-04-04 13:32 UTC (permalink / raw)
  To: zsh-workers


>From Peter's compinstall:

  # TODO: I couldn't be bothered to handle sort because it does different
  #       things in different context (which I'm kind of against anyway).

As far as I can see, there are currently four styles used in more than
one type of context:

- cursor: paths and predict, different possible values
- list: i-c-w and history, but means almost the same in both
- sort: history, files, _expand, different possible values, slightly
        different meaning
- stop: history and i-c-w, completely different meaning

So, should we change that to:

- use ambiguous (or first-ambiguous?) for paths
- leave the list style as it is
- use file-sort (or sort-files; I'm thinking about file-patterns) for
  files, leave the rest
- stop-keys for i-c-w (and change break to break-keys)

Or use better names? (;-) Or make more dramatic changes?

Bye
 Sven


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


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

* Re: Style names
  2000-04-04 13:32 Style names Sven Wischnowsky
@ 2000-04-04 19:31 ` Peter Stephenson
  0 siblings, 0 replies; 5+ messages in thread
From: Peter Stephenson @ 2000-04-04 19:31 UTC (permalink / raw)
  To: zsh-workers

Sven Wischnowsky wrote:
> 
> >From Peter's compinstall:
> 
>   # TODO: I couldn't be bothered to handle sort because it does different
>   #       things in different context (which I'm kind of against anyway).
> 
> As far as I can see, there are currently four styles used in more than
> one type of context:

Sorry, I committed that accidentally before I'd quite finished it, hence it
hasn't been documented.  Before it's ready for use I need to update it to
write the changes back to the file.  It's good enough for testing though;
it just outputs the changes to stdout.

The things that need doing are styles for files, in particular, things
consequent on particular styles like the bindkey for _expand and
completeinword for prefix, and in the long run maybe a way of setting
options (which should be simpler than styles).  In the even longer run
maybe the handling of contexts could be more intelligent, but I don't even
know how yet.

> - use ambiguous (or first-ambiguous?) for paths
> - leave the list style as it is
> - use file-sort (or sort-files; I'm thinking about file-patterns) for
>   files, leave the rest
> - stop-keys for i-c-w (and change break to break-keys)

This sounds pretty good.

-- 
Peter Stephenson <pws@pwstephenson.fsnet.co.uk>
Work: pws@CambridgeSiliconRadio.com
Web: http://www.pwstephenson.fsnet.co.uk


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

* Re: Style names
@ 2000-02-21 12:54 Sven Wischnowsky
  0 siblings, 0 replies; 5+ messages in thread
From: Sven Wischnowsky @ 2000-02-21 12:54 UTC (permalink / raw)
  To: zsh-workers


... and before I forget it again: is there a good reason why the
remote_glob style of zftp uses an underscore instead of a minus sign
(as all other styles do)? Can we change it? I would even offer to
build the patch if everyone else is too busy.


Bye
 Sven


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


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

* Re: Style names
@ 2000-02-21  8:49 Sven Wischnowsky
  0 siblings, 0 replies; 5+ messages in thread
From: Sven Wischnowsky @ 2000-02-21  8:49 UTC (permalink / raw)
  To: zsh-workers


Peter Stephenson wrote:

> ...
> 
> The particular problem is with `menu' and `list' in _oldlist, and
> `original' in _match.  These do slightly different things to the same
> styles when used elsewhere --- this is explicit in the manual --- so that
> you need to alter the context to make the style change a different feature.
> This is a little unnatural, and more importantly for my purpose harder to
> do automatically.  I'd like to suggest, therefore, that the styles for
> these uses be renamed to old-menu, old-list and match-original (or some
> other set to be agreed upon).  Then I can simply whack them in without
> worrying about altering the context.

I think that's ok. Probably even less confusing for users anyway.

Bye
 Sven


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


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

* Style names
@ 2000-02-20 18:36 Peter Stephenson
  0 siblings, 0 replies; 5+ messages in thread
From: Peter Stephenson @ 2000-02-20 18:36 UTC (permalink / raw)
  To: Zsh hackers list

I'm writing the part of compinstall version 2 which allows you to set
styles for minor completers such as _oldlist and _match.  The biggest
difficulty in setting styles automatically is working out what the context
should be.  For now, it's just set by the user and defaults to
:completion:*.  Ideally, it would be good if all the basic styles could
simply be set in this context without interfering with one another, so that
you only need to use a different context if you really want to narrow the
scope of the effect.

The particular problem is with `menu' and `list' in _oldlist, and
`original' in _match.  These do slightly different things to the same
styles when used elsewhere --- this is explicit in the manual --- so that
you need to alter the context to make the style change a different feature.
This is a little unnatural, and more importantly for my purpose harder to
do automatically.  I'd like to suggest, therefore, that the styles for
these uses be renamed to old-menu, old-list and match-original (or some
other set to be agreed upon).  Then I can simply whack them in without
worrying about altering the context.

If you can't see what I'm talking about, compare for example with
`insert-unambiguous': this too is used by different completers, namely
_approximate and _match, but this time does exactly the same thing in both
cases, so it's perfectly natural to have it set in the default context for
both matchers.  I think this distinction is important (though I wouldn't
have noticed if it wasn't making my life harder).

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


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

end of thread, other threads:[~2000-04-04 19:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-04-04 13:32 Style names Sven Wischnowsky
2000-04-04 19:31 ` Peter Stephenson
  -- strict thread matches above, loose matches on Subject: below --
2000-02-21 12:54 Sven Wischnowsky
2000-02-21  8:49 Sven Wischnowsky
2000-02-20 18:36 Peter Stephenson

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