zsh-users
 help / color / mirror / code / Atom feed
* Re: (forw) --help able programs and completion]
@ 2000-06-26 11:08 Matthias Kopfermann
  0 siblings, 0 replies; 8+ messages in thread
From: Matthias Kopfermann @ 2000-06-26 11:08 UTC (permalink / raw)
  To: zsh-users

> 
> Nowhere. compinstall is about configuration with styles (mostly).
that's what i was thinking. Still it helps a beginning
compstyle-user. perhaps something like that for the _complete_ functions?
> We have a function to complete the options described by the `--help'
> output, it's called `_use_lo'
Hmm, a name that really does not explain anything, does it?
So in order to use it one has to know it first :)

On the other hand I am happy that I can use this function, thank
you!


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

* RE: (forw) --help able programs and completion]
  2000-06-27 14:36 ` Bart Schaefer
@ 2000-06-27 14:46   ` Andrej Borsenkow
  0 siblings, 0 replies; 8+ messages in thread
From: Andrej Borsenkow @ 2000-06-27 14:46 UTC (permalink / raw)
  To: Bart Schaefer, zsh-users

>
> What I was expecting, for some reason, was that menu
> selection would start
> immediately if there were more than N matches, not wait for
> the second TAB
> that triggers automenu.  I.e., I want automenu (two TAB)
> behavior if there
> are fewer than N matches, and menu-select (one TAB) behavior
> for N or more.
>
> I don't know how I got the idea in my head that select=N by
> itself works
> that way.  Is there a configuration that does work that way?
>


Sounds interesting. Actually, it looks like more general form of menu
style ... currently we can set it so, that menu selection starts when
matches do not fit on screen; more general style would allow exactly
what you want.

I am perfectly sure it is a matter of one line in the _main_complete; I
just looked where select=long is looked up - should be the right place.

-andrej


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

* Re: (forw) --help able programs and completion]
  2000-06-27 11:08 Sven Wischnowsky
@ 2000-06-27 14:36 ` Bart Schaefer
  2000-06-27 14:46   ` Andrej Borsenkow
  0 siblings, 1 reply; 8+ messages in thread
From: Bart Schaefer @ 2000-06-27 14:36 UTC (permalink / raw)
  To: zsh-users

On Jun 27,  1:08pm, Sven Wischnowsky wrote:
} Subject: Re: (forw) --help able programs and completion]
}
} Bart Schaefer wrote:
} 
} > Which reminds me, Sven:  There's still the bug where setting the `menu'
} > style to `select=N' for some number N is not working at all.  Menu
} > selection never starts for me.
} 
} Huh? It works for me when I do something that would start
} menu-completion (automenu or...). And if there are enough matches, of
} course.

Sorry, I'm confused.

What I was expecting, for some reason, was that menu selection would start
immediately if there were more than N matches, not wait for the second TAB
that triggers automenu.  I.e., I want automenu (two TAB) behavior if there
are fewer than N matches, and menu-select (one TAB) behavior for N or more.

I don't know how I got the idea in my head that select=N by itself works
that way.  Is there a configuration that does work that way?

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   


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

* Re: (forw) --help able programs and completion]
@ 2000-06-27 11:08 Sven Wischnowsky
  2000-06-27 14:36 ` Bart Schaefer
  0 siblings, 1 reply; 8+ messages in thread
From: Sven Wischnowsky @ 2000-06-27 11:08 UTC (permalink / raw)
  To: zsh-users


Bart Schaefer wrote:

> ...
> 
> Which reminds me, Sven:  There's still the bug where setting the `menu'
> style to `select=N' for some number N is not working at all.  Menu
> selection never starts for me.

Huh? It works for me when I do something that would start
menu-completion (automenu or...). And if there are enough matches, of
course.

And without explicitly loading complist.

Bye
 Sven


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


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

* Re: (forw) --help able programs and completion]
  2000-06-26 15:34   ` Matt Armstrong
@ 2000-06-26 16:03     ` Bart Schaefer
  0 siblings, 0 replies; 8+ messages in thread
From: Bart Schaefer @ 2000-06-26 16:03 UTC (permalink / raw)
  To: Matt Armstrong, zsh-users

On Jun 26,  8:34am, Matt Armstrong wrote:
}
} squeaker% tar --_main_complete:142: permission denied:
} <then I press ENTER again>
} tar: You must specify one of the `-Acdtrux' options
} Try `tar --help' for more information.
} 
} Let me know if there is more I can help to debug this.

The standard thing nowadays is to use the _complete_debug binding, which
should be ctrl-x question-mark.  You type <C-x?> instead of <TAB> at any
lace where the new completion system is giving you trouble, and it'll
`setopt xtrace` (temporarily) and dump the output into a temp file.

An entry is made into your command history to run an editor or pager on
the temp file (so you can use ctrl-p to find it).  Most of the time it
also manages to tell you what it did and the name of the temp file, but
that doesn't always work because other completion output may cover it up.  

} Line 142 of _main_complete is:
} 
}     elif "$tmp"; then

(That's line 152 in the latest CVS snapshot.)

That's supposed to be executing a completer, which should be a shell
function.  If that's really where the error is occuring (I ought to trust
zsh's line numbering more than I do) then you probably have a bad entry
in your "completer" zstyle.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   


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

* Re: (forw) --help able programs and completion]
  2000-06-26 15:19 ` Bart Schaefer
@ 2000-06-26 15:34   ` Matt Armstrong
  2000-06-26 16:03     ` Bart Schaefer
  0 siblings, 1 reply; 8+ messages in thread
From: Matt Armstrong @ 2000-06-26 15:34 UTC (permalink / raw)
  To: zsh-users

On Mon, Jun 26, 2000 at 03:19:01PM +0000, Bart Schaefer wrote:
> On Jun 26,  1:12pm, Sven Wischnowsky wrote:
> 	% tar --<TAB>
> 
> and watch the fun.

squeaker% tar --_main_complete:142: permission denied:
<then I press ENTER again>
tar: You must specify one of the `-Acdtrux' options
Try `tar --help' for more information.

Let me know if there is more I can help to debug this.  Line 142 of
_main_complete is:

    elif "$tmp"; then


-- 
matt


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

* Re: (forw) --help able programs and completion]
  2000-06-26 11:12 Sven Wischnowsky
@ 2000-06-26 15:19 ` Bart Schaefer
  2000-06-26 15:34   ` Matt Armstrong
  0 siblings, 1 reply; 8+ messages in thread
From: Bart Schaefer @ 2000-06-26 15:19 UTC (permalink / raw)
  To: Sven Wischnowsky, zsh-users; +Cc: Matthias Kopfermann

On Jun 26,  1:12pm, Sven Wischnowsky wrote:
} Subject: Re: (forw) --help able programs and completion]
}
} > > We have a function to complete the options described by the `--help'
} > > output, it's called `_use_lo'
} > Hmm, a name that really does not explain anything, does it?

It stands for "use long options", because it used to be a wrapper for the
now-defunct _long_options completer (which was completely subsumed by
_arguments some while back).

} > So in order to use it one has to know it first :)
} 
} Yes.

However, note that all it does is call _arguments, which is what 98% of
the completers for other commands also do.  So most commands for which
there is a special completion already have the ability to complete based
on --help output:  It's triggered by completing after `--'.  Try, for
example

	% tar --<TAB>

and watch the fun.

Which reminds me, Sven:  There's still the bug where setting the `menu'
style to `select=N' for some number N is not working at all.  Menu
selection never starts for me.

} The one who wrote it probably should have documented it
} somewhere.
} 
} I /think/ it wasn't me this time.

This is very interesting.

The earliest mention of _use_lo in the zsh-workers archive is PWS saying
"What happened to _use_lo?  I don't remember removing it." just before he
made the 3.1.6-test-1 release.  That's the first time it shows up in my
home CVS repository, too.  The ChangeLog-Release file doesn't mention it
at all until Sven started patching it (and the entire contents except for
the comment at the top have long been Sven's doing, even if he didn't
create the file originally).

Of course, the ChangeLog also doesn't make any mention of when _arguments
acquired the internals of _long_options.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   


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

* Re: (forw) --help able programs and completion]
@ 2000-06-26 11:12 Sven Wischnowsky
  2000-06-26 15:19 ` Bart Schaefer
  0 siblings, 1 reply; 8+ messages in thread
From: Sven Wischnowsky @ 2000-06-26 11:12 UTC (permalink / raw)
  To: zsh-users; +Cc: Matthias Kopfermann


Matthias Kopfermann wrote:

> > Nowhere. compinstall is about configuration with styles (mostly).
> that's what i was thinking. Still it helps a beginning
> compstyle-user. perhaps something like that for the _complete_ functions?
> > We have a function to complete the options described by the `--help'
> > output, it's called `_use_lo'
> Hmm, a name that really does not explain anything, does it?
> So in order to use it one has to know it first :)

Yes. The one who wrote it probably should have documented it
somewhere.

I /think/ it wasn't me this time.

> On the other hand I am happy that I can use this function, thank
> you!

Pas de probleme...

Bye
 Sven

P.S.: Hittfeld? *Das* Hittfeld? Ich hab' mal in Buchholz gewohnt
      (naja, in Holm-Seppensen)...

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


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

end of thread, other threads:[~2000-06-27 14:47 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-06-26 11:08 (forw) --help able programs and completion] Matthias Kopfermann
2000-06-26 11:12 Sven Wischnowsky
2000-06-26 15:19 ` Bart Schaefer
2000-06-26 15:34   ` Matt Armstrong
2000-06-26 16:03     ` Bart Schaefer
2000-06-27 11:08 Sven Wischnowsky
2000-06-27 14:36 ` Bart Schaefer
2000-06-27 14:46   ` Andrej Borsenkow

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