zsh-users
 help / color / mirror / code / Atom feed
* Interactive program in Zsh
@ 2004-06-09 14:32 DervishD
  2004-06-09 14:44 ` Pierre HABOUZIT
  2004-06-10 15:37 ` Bart Schaefer
  0 siblings, 2 replies; 8+ messages in thread
From: DervishD @ 2004-06-09 14:32 UTC (permalink / raw)
  To: Zsh Users

    Hello all :)

    I need a program that processes some text and presents a few
options to the user. I know how to do it using 'read -k' for reading
keystrokes and using a couple of escape sequences and 'print' for
printing the output, but I would like to use zle widgets for that.

    What I mean is that I would like to use widget names instead of
escape sequences, something like getting 'up-line-or-history' instead
of "^[[A" if the user presses 'up arrow', so I can use the key combo
that the user wants for going up in a list instead of a fixed
sequence.

    I don't know if this is the proper approach for what I need to
do: the user is limited to use up arrow and down arrow for travelling
into the list of options (maybe pg-up and pg-down for scrolling) and
'enter' to select the highlighted option. The program must process a
text, present a list of options containing the text that matched
certain regex and allow the user to choose one of the options.

    Could you please point me to a source of information? Is this a
good approach or should I write a C program with ncurses? Portability
is not an issue, so to say I want the program be 'zsh-portable', able
to run in any zsh configuration (that's the reason I don't want to
use key sequences).

    Thanks a lot in advance :)

    Raúl Núñez de Arenas Coronado

-- 
Linux Registered User 88736
http://www.pleyades.net & http://raul.pleyades.net/


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

end of thread, other threads:[~2004-06-11  9:43 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-09 14:32 Interactive program in Zsh DervishD
2004-06-09 14:44 ` Pierre HABOUZIT
2004-06-09 14:52   ` DervishD
2004-06-10 15:37 ` Bart Schaefer
2004-06-10 17:21   ` DervishD
2004-06-11  6:19     ` Bart Schaefer
2004-06-11  9:38       ` Peter Stephenson
2004-06-11  9:41       ` DervishD

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