zsh-users
 help / color / mirror / code / Atom feed
* Re: various completion queries
@ 1999-09-30 23:50 Benjamin Korvemaker
  1999-10-01  7:11 ` Adam Spiers
  0 siblings, 1 reply; 3+ messages in thread
From: Benjamin Korvemaker @ 1999-09-30 23:50 UTC (permalink / raw)
  To: zsh-users

Ooooh.. I'm *SO* glad I asked before hacking this time. I'm much
happier leaving the shell internals alone. The big questions now:
1) How can I have incremental-word-complete ON by default (ie. it's on
   when I start typing)
2) When there are too many completions, and a prompt like

zsh: do you wish to see all 102 possibilities? 

   shows up, can I simply get it to:
    a) not prompt,
    b) not list, and
    c) maybe say "**lotsa completions - not listing**"

Thanks for the help!

Ben



Peter Stephenson said:
[...]
> > Benjamin Korvemaker (benjamin@cs.ualberta.ca) wrote:
> > > I'm at that point in my life where I need a shell that fills in the
> > > completion automagically and changes it as necessary the more I type
> > > (just like that horrible feature that MS products tend to have).
> > 
> > If I understand you correctly, then yes, there's a function called
> > incremental-complete-word
> 
> Yes, that's the place to look first.  It could probably do with some
> developing --- it's getting quite complicated, almost like an editor within
> the editor.
> 
> > Presumably you'd want to tell it complete words from the history.  I
> > don't know when it first appeared, but you're best off using it with
> > the latest development versions: 3.1.6 and later.
> 
> You'll certainly need 3.1.6; although it's not actually a new completion
> widget, and should interact happily with old compctl-style completion (I
> haven't tried), it still needs editor features from 3.1.6 or later.
> 
> One remaining task might be to allow it to combine with specific completion
> widgets, not just ordinary contextual completion.  Actually, that shouldn't
> be so hard: replace the call to `zle complete-word' with something more
> general which tests if a parameter with an alternative command was set by a
> wrapper.  The trick is to make sure such commands don't use menu
> behaviour, which will confuse it.
-- 
Benjamin Korvemaker
benjamin@cs.ualberta.ca
	I was born in Nicaragua and I felt there wasn't enough
        political instability in my life. So I moved to Quebec.
			    - Marta Chaves


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

* Re: various completion queries
  1999-09-30 23:50 various completion queries Benjamin Korvemaker
@ 1999-10-01  7:11 ` Adam Spiers
  0 siblings, 0 replies; 3+ messages in thread
From: Adam Spiers @ 1999-10-01  7:11 UTC (permalink / raw)
  To: zsh-users

Benjamin Korvemaker (benjamin@cs.ualberta.ca) wrote:
> Ooooh.. I'm *SO* glad I asked before hacking this time. I'm much
> happier leaving the shell internals alone. The big questions now:

[...]

> 2) When there are too many completions, and a prompt like
> 
> zsh: do you wish to see all 102 possibilities? 
> 
>    shows up, can I simply get it to:
>     a) not prompt,
>     b) not list, and
>     c) maybe say "**lotsa completions - not listing**"

      d) list the completion groups and the number of matches in each,
         and then let you choose which group to complete from.

Selecting completion groups would be a nice feature in any case.

I might have a go at hacking some of these, but will probably fail and
have to wait for Sven to get back.  I'm away this w/e myself, however.


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

* Re: various completion queries
  1999-09-29 20:10 zsh and RPM: a case of study (for me) Adam Spiers
@ 1999-09-30  9:05 ` Peter Stephenson
  0 siblings, 0 replies; 3+ messages in thread
From: Peter Stephenson @ 1999-09-30  9:05 UTC (permalink / raw)
  To: zsh-users

Adam Spiers wrote:
> Actually it is, but the new system handles complex completions much
> more effortlessly, and with greater success.
> 
> Damn, I can see similar questions arising when I get my friends going
> on 3.1.6.  Peter, is any of that re-usable in the guide?  Probably
> not.

It's the sort of thing I want to say.  There's even a case to be made for
my jumping straight to that chapter and doing it next, since it's topical.
The downside is it's going to need a lot of rewriting later (some kind of
stability in the features of the completion system is the main prerequisite
for 3.1.7).  Unfortunately, even then it could be slow to write: I've been
lucky so far, in that I'm finishing up here, so things have been slacker
than usual and I've had some time, but from now on anything could happen.

> Benjamin Korvemaker (benjamin@cs.ualberta.ca) wrote:
> > I'm at that point in my life where I need a shell that fills in the
> > completion automagically and changes it as necessary the more I type
> > (just like that horrible feature that MS products tend to have).
> 
> If I understand you correctly, then yes, there's a function called
> incremental-complete-word

Yes, that's the place to look first.  It could probably do with some
developing --- it's getting quite complicated, almost like an editor within
the editor.

> Presumably you'd want to tell it complete words from the history.  I
> don't know when it first appeared, but you're best off using it with
> the latest development versions: 3.1.6 and later.

You'll certainly need 3.1.6; although it's not actually a new completion
widget, and should interact happily with old compctl-style completion (I
haven't tried), it still needs editor features from 3.1.6 or later.

One remaining task might be to allow it to combine with specific completion
widgets, not just ordinary contextual completion.  Actually, that shouldn't
be so hard: replace the call to `zle complete-word' with something more
general which tests if a parameter with an alternative command was set by a
wrapper.  The trick is to make sure such commands don't use menu
behaviour, which will confuse it.

-- 
Peter Stephenson <pws@ibmth.df.unipi.it>       Tel: +39 050 844536
WWW:  http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy


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

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

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-09-30 23:50 various completion queries Benjamin Korvemaker
1999-10-01  7:11 ` Adam Spiers
  -- strict thread matches above, loose matches on Subject: below --
1999-09-29 20:10 zsh and RPM: a case of study (for me) Adam Spiers
1999-09-30  9:05 ` various completion queries 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).