zsh-workers
 help / color / mirror / code / Atom feed
From: Tanaka Akira <akr@jaist.ac.jp>
To: zsh-workers@sunsite.auc.dk
Subject: Re: PATCH: Re: completion after ../
Date: 18 Feb 2000 08:33:10 +0900	[thread overview]
Message-ID: <rsq1z6bz9op.fsf@crane.jaist.ac.jp> (raw)
In-Reply-To: <200001240910.KAA02702@beta.informatik.hu-berlin.de>

In article <200001240910.KAA02702@beta.informatik.hu-berlin.de>,
  Sven Wischnowsky <wischnow@informatik.hu-berlin.de> writes:

> Or maybe we write a completer (a real, top-level completer) that
> registers a post-completion function which checks if there are only
> alternate matches (or only one alternate match) and no normal one and, 
> if this is the case, makes a list be shown instead of the match(es) be 
> used. That would be quite easy (set compstate[insert]='',
> compstate[list]='list force'), , but I'm not sure if this is enough or 
> the right thing at all.

I tried this and I found it's enough for me.  Of course, I agree that
it's quite inconsistent behaviour and it shouldn't be default.

So I want to insert following fragment at last in _main_complete.

if zstyle -b ":completion:..." &&
   [[ $compstate[old_list] != shown &&
      $compstate[nmatches] = 0 &&
      $compstate[alternate_nmatches] = 1 ]]; then
  compstate[insert]=''
  compstate[list]='list force'
fi

What's a proper context and a style?  I couldn't find them.
-- 
Tanaka Akira


  reply	other threads:[~2000-02-17 23:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-01-24  9:10 Sven Wischnowsky
2000-02-17 23:33 ` Tanaka Akira [this message]
  -- strict thread matches above, loose matches on Subject: below --
2000-02-21  9:28 Sven Wischnowsky
2000-02-18  9:39 Sven Wischnowsky
2000-02-20 12:17 ` Tanaka Akira
2000-01-21 13:39 Sven Wischnowsky
2000-01-21 18:11 ` Tanaka Akira

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=rsq1z6bz9op.fsf@crane.jaist.ac.jp \
    --to=akr@jaist.ac.jp \
    --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).