zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: RE: side effect of "select=long"
@ 2000-05-22 12:20 Sven Wischnowsky
  2000-05-22 12:48 ` Andrej Borsenkow
  2000-05-22 13:44 ` Still problems " Andrej Borsenkow
  0 siblings, 2 replies; 3+ messages in thread
From: Sven Wischnowsky @ 2000-05-22 12:20 UTC (permalink / raw)
  To: zsh-workers


Andrej Borsenkow wrote:

> Not at all. We have separately completion lists AND menu
> completion/selection. First list is displayed (of course, with
> corresponding settings) and then, on the second TAB, menu
> completion/selection is started. So, that means `start selection INSTEAD
> of list if matches do not fit on the screen and start selection ON THE
> SECOND TAB always (assuming, it was not started already)'.

That's what I wanted to make possible. There was a thinko in the code, 
though, sorry. The incantation is, of course:

  zstyle ':completion:*' menu 'select=0' 'select=long-list'

Ok?

Bye
 Sven

Index: Completion/Core/_main_complete
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Core/_main_complete,v
retrieving revision 1.24
diff -u -r1.24 _main_complete
--- Completion/Core/_main_complete	2000/05/22 12:14:37	1.24
+++ Completion/Core/_main_complete	2000/05/22 12:20:49
@@ -159,9 +159,9 @@
 
   _menu_style=( "$_menu_style[@]" "$_def_menu_style[@]" )
 
-  if [[ -z "$compstate[insert]" ]]; then
-    [[ -n "$_menu_style[(r)select=long-list]" && tmp -gt LINES ]] &&
-        compstate[insert]=menu
+  if [[ "$compstate[list]" = *list &&
+        -n "$_menu_style[(r)select=long-list]" && tmp -gt LINES ]]; then
+    compstate[insert]=menu
   elif [[ "$compstate[insert]" = "$_saved_insert" ]]; then
     if [[ -n "$_menu_style[(r)select=long]" && tmp -gt LINES ]]; then
         compstate[insert]=menu

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


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

* RE: PATCH: RE: side effect of "select=long"
  2000-05-22 12:20 PATCH: RE: side effect of "select=long" Sven Wischnowsky
@ 2000-05-22 12:48 ` Andrej Borsenkow
  2000-05-22 13:44 ` Still problems " Andrej Borsenkow
  1 sibling, 0 replies; 3+ messages in thread
From: Andrej Borsenkow @ 2000-05-22 12:48 UTC (permalink / raw)
  To: Sven Wischnowsky, zsh-workers


>
>   zstyle ':completion:*' menu 'select=0' 'select=long-list'
>
> Ok?
>


Yep. The only strange thing, it does not always recognize changed style
immediately ... dunno why (I mean, when I set it on command line).

To Peter (compinstall :-): I think, this option belongs to different
menu. Currently we have:

     *** compinstall: options for colouring and selecting in lists ***

1.   Use coloured lists for listing completions.

2.   Use cursor keys to select completions from completion lists.

3.   Allow scrolling of long selection lists and set the prompt.

IMHO it nicely fits into 3, where we then have two choices, like "Always
scroll the list" and "Start menu selection if ..."; for the latter then
start it always or just for pure completion. After all, in this case
menu selection is more a replacement for list.

-andrej


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

* Still problems RE: PATCH: RE: side effect of "select=long"
  2000-05-22 12:20 PATCH: RE: side effect of "select=long" Sven Wischnowsky
  2000-05-22 12:48 ` Andrej Borsenkow
@ 2000-05-22 13:44 ` Andrej Borsenkow
  1 sibling, 0 replies; 3+ messages in thread
From: Andrej Borsenkow @ 2000-05-22 13:44 UTC (permalink / raw)
  To: Sven Wischnowsky, zsh-workers

> though, sorry. The incantation is, of course:
>
>   zstyle ':completion:*' menu 'select=0' 'select=long-list'
>

It does not work if I set it this way initially. See:

bor@itsrm2% zsh -f
itsrm2% autoload -U compinit; compinit -D
itsrm2% bindkey -e
itsrm2% zmodload complist
itsrm2% zstyle ':completion:*' menu 'select=0' 'select=long-list'

Try anything simple like 'ls TAB TAB' - NO menu selection whatever, just
menu completion. But if you instead do:

bor@itsrm2% zsh -f
itsrm2% autoload -U compinit; compinit -D
itsrm2% bindkey -e
itsrm2% zmodload complist
itsrm2% zstyle ':completion:*' menu 'select=0'
==Step 1== Now, again, try completion - menu selection IS started
itsrm2% zstyle ':completion:*' menu 'select=0' 'select=long-list'

and from now on we correctly have both menu selection in completion and
lists. BUT if you do NOT actually do completion in Step 1 - result is
the same; that is, just calling two

itsrm2% zstyle ':completion:*' menu 'select=0'
itsrm2% zstyle ':completion:*' menu 'select=0' 'select=long-list'

is not enough and does not work.

-andrej


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

end of thread, other threads:[~2000-05-22 13:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-05-22 12:20 PATCH: RE: side effect of "select=long" Sven Wischnowsky
2000-05-22 12:48 ` Andrej Borsenkow
2000-05-22 13:44 ` Still problems " 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).