zsh-workers
 help / color / mirror / code / Atom feed
From: martin.ebourne@arcordia.com
To: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
Cc: zsh-workers@sunsite.dk
Subject: Re: PATCH: Re: Delaying menu completion
Date: Tue, 14 Aug 2001 13:24:33 +0100	[thread overview]
Message-ID: <OF7CC86BB5.BC6096C8-ON80256AA8.00438543@uk.jpmorgan.com> (raw)



> So I'd have changed it to either:
>
>   if zstyle -t "..." insert-unambiguous; then
>     compstate[pattern_insert]=unambiguous
>   elif _requested ...
>
> or
>
>   zstyle -s "..." insert-unambiguous ins
>   if [[ $ins = (true|yes|on|1) ||
>         ( $ins = sometimes &&
>           $compstate[unambiguous] -is sensible ) ]]; then
>     compstate[pattern_insert]=unambiguous
>   elif _requested ...
>
> What do people think?  Should we make `always' normal the meaning of
> insert-unambiguous==true?  Keep the test?  Making it be used on a new
> special value would of course do no harm.

The problem here is this will give you what I had been getting yesterday
when playing with this. In the case that the unambiguous bit is shorter
than the word on the command line, the extraneous stuff is deleted from the
command line. This certainly isn't what I wanted (maybe someone does
though) - I just wanted it to do nothing at all, leaving me to either edit
the line or invoke menu selection. In order to get that to happen, the
following chunk of code I purloined from _match is essential:

      [[ "$compstate[insert]" != *menu ]] &&
        compstate[pattern_insert]= compstate[insert]=

> Ah.  Humm.  That's caused by completecall() (in zle_tricky.c).  The
> problem is that the completion widgets normally return non-zero if no
> matches were generated and the code there tries to ensure that even
> for user defined completion widgets.  I.e., it specifically replaces
> the zero returned from a user-defined widget with a `1' to signal that
> completion `failed'.  That's ugly in cases like this one, yes, but I
> don't know if we should change it.

Sounds like something that's better left alone to me. Presumably the
returning 1 is to get zsh to ring the bell. Perhaps a note on this in the
info pages would be the best solution.

Cheers,

Martin.



             reply	other threads:[~2001-08-14 12:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-14 12:24 martin.ebourne [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-08-16  9:51 martin.ebourne
2001-08-14  9:21 martin.ebourne
2001-08-14 12:02 ` Sven Wischnowsky
2001-08-14 16:03 ` 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=OF7CC86BB5.BC6096C8-ON80256AA8.00438543@uk.jpmorgan.com \
    --to=martin.ebourne@arcordia.com \
    --cc=wischnow@informatik.hu-berlin.de \
    --cc=zsh-workers@sunsite.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).