Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

RE: Non-patch: zle argument handling



>
> Andrej Borsenkow wrote:
>
> > Related question - is it possible to use minibuffer from
> user-defined widgets?
> > Is it useful? Or it can be implemented with current changes to read?
>
> My little isearch example did that: with a combination of `read -k'
> and `zle -R "search: $str"' (the argument of `-R' is displayed in the
> statusline).
>
>

You cannot edit input with read -k.

bor@itsrm2:~%> foo() {
function> read -k 4 test
function> print $#test
function> }
bor@itsrm2:~%> foo
12^H^H4

So, either widget should make all edtiting itself, or we need some way to
dispatch on input key sequences (to call normal editing widget) or (better yet)
to use minibuffer with builtin editing.

/andrej



Messages sorted by: Reverse Date, Date, Thread, Author