zsh-workers
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: zsh-workers@sunsite.auc.dk
Subject: Time for an obscure completion question
Date: Tue, 11 Apr 2000 00:49:41 +0000	[thread overview]
Message-ID: <1000411004941.ZM31329@candle.brasslantern.com> (raw)

Given the completion styles (straight out of compinstall except for moving
the _ignored completer):

zstyle ':completion:*' completer _oldlist _expand _complete _match _ignored _approximate _prefix
zstyle ':completion:*' match-original both
zstyle ':completion:*' matcher-list '' 'r:|[._-,]=* r:|=*' 'm:{a-zA-Z}={A-Za-z} r:|[._-,]=* r:|=*' 'r:|[._-,]=* r:|=* l:|=*'
zstyle ':completion:*' max-errors 2 numeric
zstyle ':completion:*' original true

If I have a directory named "foodatthe/Bar" (to borrow from PWS) and I type:

zsh% cd *at/ba<TAB>

I'm offered the two completions

foodatthe/    *at/ba

This is apparently what I asked for, but it's not what I want. I want the
"original" as considered by _approximate to be the output (for lack of a
better word) of _expand _complete _match.  That is, if there's exactly one
possible expansion of the part with the pattern, then I want that accepted
so that the menu becomes:

foodatthe/Bar   foodatthe/ba

Ignoring that for the moment ... if I type

zsh% cd *at/ba<C-x h>

i.e., invoke completion help, I see a set of contexts and then the possible
completions at the end.  So far so good, but now if I hit TAB the argument
gets erased and I'm left with

zsh% cd 
        ^ cursor here

A similar thing happens here:

zsh% cd *at/ba<TAB><C-e><TAB><TAB><TAB>
zsh% cd  
         ^cursor

The first TAB gives "foodatthe/ba" and lists two completions; I hit C-e to
break out of menu completion (is there a better way?) and TAB again which
gives me the correction "foodatthe/Bar/" and again lists two completions.
Hit TAB again and there's a feep; hit TAB a third time and the argument
vanishes, replaced by a space.  I would have expected it to just keep on
feeping at me for as long as I bang on tab.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com


             reply	other threads:[~2000-04-11  0:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-04-11  0:49 Bart Schaefer [this message]
2000-04-11  9:36 Sven Wischnowsky
2000-04-11 16:21 ` 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=1000411004941.ZM31329@candle.brasslantern.com \
    --to=schaefer@candle.brasslantern.com \
    --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).