From: Marc Weber <marco-oweber@gmx.de>
To: zsh-workers <zsh-workers@zsh.org>
Subject: select item from list in modify-current-argument?
Date: Sat, 04 Jun 2011 01:41:36 +0200 [thread overview]
Message-ID: <1307144249-sup-4787@nixos> (raw)
I have my own tool for selecting paths
(github.com/MarcWeber/path-selector).
I'd like to use it within ZSH.
I came up with this:
http://dpaste.com/550269/
(You can replace line 78 by 79)
select-one first uses echo to show the alternatives, then read to get
the item index from the user.
However because echo shows many lines the code copied from
modify-current-argument get's confused.
ctl-l redraws the current line but drops some history.
zle -R does not help
Is there an even better way to implement select-one?
Pointing me to sample code will be enough.
Marc Weber
next reply other threads:[~2011-06-03 23:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-03 23:41 Marc Weber [this message]
2011-06-04 18:32 ` Bart Schaefer
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=1307144249-sup-4787@nixos \
--to=marco-oweber@gmx.de \
--cc=zsh-workers@zsh.org \
/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).