Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
select item from list in modify-current-argument?
- X-seq: zsh-workers 29454
- From: Marc Weber <marco-oweber@xxxxxx>
- To: zsh-workers <zsh-workers@xxxxxxx>
- Subject: select item from list in modify-current-argument?
- Date: Sat, 04 Jun 2011 01:41:36 +0200
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author