zsh-workers
 help / color / mirror / code / Atom feed
* Feature requests
@ 2013-06-02 22:53 Andi Șerbănescu
  2013-06-03  1:55 ` Bart Schaefer
  0 siblings, 1 reply; 2+ messages in thread
From: Andi Șerbănescu @ 2013-06-02 22:53 UTC (permalink / raw)
  To: zsh-workers

Hello,

I've been a user of zsh for some time. I've gotten used to it and
appreciate the breadth (and depth) of configurability which it offers.
Despite of this, there are two minor features whose absence bugs me a
little and which I would like to be added.

The first one regards the behaviour of the LISTMAX variable.
Currently, it's possible to make zsh list a maximum or a minimum
number of (lines of) matches without asking, ask only if the list of
matches exceeds one screenfull, or page the list by setting
LISTPROMPT.

There is no way, however, to disable the prompt altogether (the best
one can do is to set LISTMAX to -1, which only prompts in case of a
single match). Therefore, I kindly request a small modification in
order to obtain the desired behaviour (e.g. never ask if LISTMAX is
unset).

The other one concerns the insertion and removal of suffixes (such as
spaces or slashes) after a successful completion. One option
(AUTO_REMOVE_SLASH) controls the removal of slashes. One variable
(ZLE_REMOVE_SUFFIX_CHARS) controls removal of suffixes if followed by
the respective characters, but not if one types a control (or
‘non-insertable’, according to the manual) character.

My question is: can something be done to disable the removal of the
space suffix (or any other suffix, if there are any besides space and
slash) when followed by non-insertables, the way AUTO_REMOVE_SLASH
does for slashes?

Regards,
Andi Șerbănescu


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

* Re: Feature requests
  2013-06-02 22:53 Feature requests Andi Șerbănescu
@ 2013-06-03  1:55 ` Bart Schaefer
  0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 2013-06-03  1:55 UTC (permalink / raw)
  To: Zsh hackers list

On Sun, Jun 2, 2013 at 3:53 PM, Andi Șerbănescu <ac.serbanescu@gmail.com> wrote:
>
> There is no way, however, to disable the prompt altogether (the best
> one can do is to set LISTMAX to -1, which only prompts in case of a
> single match).

I have to say I don't understand the behavior, intended or actual, of
a negative value of LISTMAX, at all.  With LISTMAX=-1 and a
description format defined, it'll prompt when there are no matches and
falsely tell you there is a match.  On the other hand it never prompts
when completing in command position no matter how many/few matches
there are, only when completing arguments, which differs from the
behavior with a positive LISTMAX.

> Therefore, I kindly request a small modification in
> order to obtain the desired behaviour (e.g. never ask if LISTMAX is
> unset).

Does it not suffice to set LISTMAX to some very large positive number?

> The other one concerns the insertion and removal of suffixes (such as
> spaces or slashes) after a successful completion. ...
>
> My question is: can something be done to disable the removal of the
> space suffix (or any other suffix, if there are any besides space and
> slash) when followed by non-insertables, the way AUTO_REMOVE_SLASH
> does for slashes?

Can you give an example?  Do you mean, for example, that you want the
suffix to stay on the line when you invoke the backward-char widget,
but to be removed when you type a space?

The way to accomplish what I just described is to define your own widget, e.g.,

backward-char-keep-suffix() { zle auto-suffix-retain; zle .backward-char "$@" }
zle -N backward-char-keep-suffix
zle -A backward-char-keep-suffix backward-char

Suffix removal behavior of other user-defined widgets may be
controlled directly by those widgets, so the above doesn't generalize
except for other built-in widgets.


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

end of thread, other threads:[~2013-06-03  1:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-02 22:53 Feature requests Andi Șerbănescu
2013-06-03  1:55 ` Bart Schaefer

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