zsh-workers
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: zsh-workers@sunsite.auc.dk
Subject: Re: Question
Date: Wed, 12 Apr 2000 16:06:33 +0000	[thread overview]
Message-ID: <1000412160634.ZM12491@candle.brasslantern.com> (raw)
In-Reply-To: <200004120851.KAA07258@beta.informatik.hu-berlin.de>

On Apr 12, 10:51am, Sven Wischnowsky wrote:
} Subject: Re: Question
}
} > (1)  Format up the completion listing as if it were going to shout, but
} > stuff it all into a string instead.  (That's probably happening already,
} > I didn't look.)  Then point a parameter at that string and invoke vared.
} > ZLE already takes care of paging up and down.
} 
} The first one is a real problem that can't be avoided with this
} solution: the colouring that's possible with complist would be lost.

I suppose so.

} I'm not sure what could
} happen when we allow something like vared (with possible user defined
} widgets being called) while the completion list is displayed.

Yes, I wondered about the warnings that cna be printed about not using
zle recursively.  You might have to save and restore the whole state of
the completion system to be entirely safe, which could get ugly.
 
} > (2) Use a "select x in ..." loop over the values.  As of some while ago,
} > select already knows how to page through screenfuls of choices.  You
} > can't go backwards, but it cycles to the top after reaching the bottom.
} 
} I never liked select and fiddling with numbers in completion lists
} seems weird to me. But then: `select already knows how to page' and `I
} don't think we should be "in the business" of implementing pagers'.

There's a difference between pausing after N lines and implementing a
pager.  A pager implies being able to scroll one or a few lines at a
time, not by whole screenfuls, and being able to move backwards as well
as forwards (or at least that's what it implies nowadays).

Is the following a pager?

	integer i=0
	while read -E
	do
	  (( ++i == LINES-2 )) &&
	    { i=0; read -q '?Continue? [no] ' </dev/tty || break }
	done

(The above reveals a possible bug:  "read -q" prints a prompt only if
standard input is a TTY, but it always reads from the TTY if there is
one.  So I had to throw in that redirection.)

} A final thought: complist is intended as the module to allow fancy
} completion list handling... would it be acceptable to add this
} scrolling stuff only to it?

If it's getting added, that's the place for it.

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


  parent reply	other threads:[~2000-04-12 16:07 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-04-12  8:51 Question Sven Wischnowsky
2000-04-12  8:56 ` Question Andrej Borsenkow
2000-04-12 16:06 ` Bart Schaefer [this message]
  -- strict thread matches above, loose matches on Subject: below --
2000-04-11  8:13 Question Sven Wischnowsky
2000-04-11  8:22 ` Question Andrej Borsenkow
2000-04-11  8:36   ` Question Sven Wischnowsky
2000-04-11  9:51     ` Question Sven Wischnowsky
2000-04-11 10:03       ` Question Andrej Borsenkow
2000-04-11 15:45         ` Question Bart Schaefer
2000-04-10  8:24 Question Sven Wischnowsky
2000-04-10 16:49 ` Question Oliver Kiddle
2000-04-10  8:05 Question Sven Wischnowsky
2000-04-10  8:09 ` Question Andrej Borsenkow
2000-04-11 20:19 ` Question Peter Stephenson

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=1000412160634.ZM12491@candle.brasslantern.com \
    --to=schaefer@candle.brasslantern.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).