From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27901 invoked from network); 11 Apr 2000 00:49:56 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 11 Apr 2000 00:49:56 -0000 Received: (qmail 7409 invoked by alias); 11 Apr 2000 00:49:48 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10629 Received: (qmail 7388 invoked from network); 11 Apr 2000 00:49:46 -0000 From: "Bart Schaefer" Message-Id: <1000411004941.ZM31329@candle.brasslantern.com> Date: Tue, 11 Apr 2000 00:49:41 +0000 X-Mailer: Z-Mail (5.0.0 30July97) To: zsh-workers@sunsite.auc.dk Subject: Time for an obscure completion question MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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 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 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 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