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: 20 Feb 2000 21:17:28 +0900	[thread overview]
Message-ID: <rsqln4gdq5j.fsf@crane.jaist.ac.jp> (raw)
In-Reply-To: Sven Wischnowsky's message of "Fri, 18 Feb 2000 10:39:19 +0100 (MET)"

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

> Or we name it `single-ignored' (yes, there must be a better name) and
> enhace it: if it's set to `show' we use the above. If it's set to
> `menu' we also add the string from the line in the alternate set (as
> usual, with -S '', in it's own group, with a call to _description and
> so on...) and start menu-completion (compstate[insert]=menu).

I tried this.  I inserted the following fragment just before line 83
in _main_complete.

if zstyle -s ":completion:${curcontext}:" single-ignored tmp &&
   [[ $compstate[old_list] != shown &&
      $compstate[nmatches] = 0 &&
      $compstate[alternate_nmatches] = 1 ]]; then
  case "$tmp" in
  show) compstate[insert]='' compstate[list]='list force';;
  menu) compstate[insert]='menu';;
  esac
  tmp=false
  [[ $tmp = menu ]] && tmp=true
else
  tmp=false
fi

if [[ $compstate[nmatches] -gt 1 ]] || $tmp; then
...

But I couldn't find the way to get the string from the alternate set.
So, it completes a word with a following space and the next <TAB>
completes a next word.

How can we get the string?
-- 
Tanaka Akira


  reply	other threads:[~2000-02-20 12:17 UTC|newest]

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