From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: RE: PATCH: Re: undo in menu selection broken
Date: Wed, 28 Jun 2000 11:02:49 +0200 (MET DST) [thread overview]
Message-ID: <200006280902.LAA32220@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: "Andrej Borsenkow"'s message of Wed, 28 Jun 2000 12:11:56 +0400
Andrej Borsenkow wrote:
> > What this patch does *not* do is fix the behaviour of a-a-i-n-h when
> > there is no match. I was thinking about making it just show some
> > message and let undo bring you back. Or maybe let it stay in the
> > selection it currently is in and show some message. But:
>
> I think, this is more general problem. I do not like what currently
> happens, when no match is found.
>
> 1. There is hardly any visual feedback (well, with verbose style and
> group names you get sort of). Good ole compctl had an option to display
> a message in this case ... I do not recall something like this in new
> completion system. Is there any style I can set to simply display "No
> matches found" in this case?
>
> 2. Something very funny happens if there is no matches and you hit TAB
> several times. The worst is, that line is erased. This hapens in menu
> selection and in normal completion as well. Consider:
This was only a problem with _oldlist. Should be fixed by the patch below.
> > 1) I wouldn't like to hard-wire this message, but adding a parameter
> > just for this looks kinda weird.
> > Or maybe just add a ZLS_COLOURS capability for it.
>
> See above. Style for general use is really welcome (not only for this
> one widget)
Maybe you should just have had a look at the docs after I wrote:
> > 2) Setting the format style for the warnings tag to a value without a
> > `%d' makes it add the descriptions of the things it tried as
> > matches which gives a much better output than using `%d'. But with
> > this, there's never a completion without matches and a-a-i-n-h
> > happily starts completing the descriptions. So maybe a-a-i-n-h
> > in menu-selection should set some parameter so that the shell code
> > can find that out. Even better would be to change the complete
> > module so that other modules like complist can put things into
> > $compstate.
>
> Ahem ... sorry, but I simply do not understand it :-)) I'm speaking from
> a user's point if view ...
Currently you can use:
zstyle ':completion:*:warnings' format 'No matches for: %d'
which gives you only the explanation. Or you can use:
zstyle ':completion:*:warnings' format 'No matches for:'
(note: no `%d') which gives you that explanation and below that the
list of descriptions for the things it tried to complete.
So, there is currently no way to make it *not* display the
descriptions. Hm, maybe, the no-`%d' is used seldom enough to allow us
to make the `add descriptions as "matches"' be controlled by another
style.
But it's cheap, showing those descriptions. All the work for it is
already done.
Bye
Sven
Index: Completion/Core/_oldlist
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Core/_oldlist,v
retrieving revision 1.6
diff -u -r1.6 _oldlist
--- Completion/Core/_oldlist 2000/05/18 08:59:29 1.6
+++ Completion/Core/_oldlist 2000/06/28 08:56:56
@@ -1,6 +1,6 @@
#autoload
-[[ _matcher_num -gt 1 ]] && return 1
+[[ _matcher_num -gt 1 || $_lastcomp[nmatches] -eq 0 ]] && return 1
local list
--
Sven Wischnowsky wischnow@informatik.hu-berlin.de
next reply other threads:[~2000-06-28 9:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-06-28 9:02 Sven Wischnowsky [this message]
2000-06-28 9:11 ` Andrej Borsenkow
-- strict thread matches above, loose matches on Subject: below --
2000-06-28 9:16 Sven Wischnowsky
2000-06-28 7:28 Sven Wischnowsky
2000-06-28 8:11 ` Andrej Borsenkow
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=200006280902.LAA32220@beta.informatik.hu-berlin.de \
--to=wischnow@informatik.hu-berlin.de \
--cc=zsh-workers@sunsite.auc.dk \
/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).