From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9836 invoked from network); 25 Mar 1999 15:09:12 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 25 Mar 1999 15:09:12 -0000 Received: (qmail 6307 invoked by alias); 25 Mar 1999 15:08:48 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 5938 Received: (qmail 6267 invoked from network); 25 Mar 1999 15:08:42 -0000 From: "Andrej Borsenkow" To: "ZSH workers mailing list" Subject: Still something strange with ambiguous prefix Date: Thu, 25 Mar 1999 18:08:03 +0300 Message-ID: <000201be76d1$47d35ff0$21c9ca95@mowp.siemens.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211 After applying all patches (except compset) and using bindkey -e bindkey '\033^M' accept-and-menu-complete bindkey '^I' complete-word bindkey '^[q' push-line-or-edit ## ## New completion ## fpath=(~/.zsh.d/Completion/* "$fpath[@]") source ~/.zsh.d/Completion/Core/compinit compconf completer=_complete:_match compconf match_original=yes 1. bor@itsrm2:~%> sudo mkdir -p /foo/{bar,bar1} bor@itsrm2:~%> sudo touch /foo/{bar,bar1}/baz bor@itsrm2:~%> l /f/b/bTAB bor@itsrm2:~%> l /foo/bar/baz That is strange. bar1 seems to be never completed. (I noted it as we have both /usr/lib and /usr/lib64s with (basically) the same contents). I'd expect it to menu complete {bar,bar1} 2. bor@itsrm2:~> l /t/s/z/D/z*iTAB bor@itsrm2:~%> l /tools/src/zsh-3.1.5-pws-13/Doc/zsh.info zsh.info zsh.info-5 zshbuiltins.1 zshoptions.1 zsh.info-1 zsh.info-6 zshbuiltins.yo zshoptions.yo zsh.info-10 zsh.info-7 zshcompwid.1 ztexi.yo zsh.info-2 zsh.info-8 zshcompwid.yo zsh.info-3 zsh.info-9 zshmisc.1 zsh.info-4 zsh.texi zshmisc.yo Yesterday it completed just to zsh.texi 3. bor@itsrm2:~%> l /t/s/gl/co*TAB bor@itsrm2:~%> l /tools/src/glib-1.1.15/co* <= cursor here glib-1.1.15/ glib-1.2.0/ So, menu completion is started for prefix, but cursor is placed at the end of word. 4. It seems to be impossible to complete only prefix in /u/i/s/*.h (oh, I like this example :-) Reading README, _expand completer has a expand_original option, that makes it include original string in a set of matches. What about something like it for _match as well (with intention, that it should be used by _path_files also)? I understand, that it probably needs either another member to compstate - or probably we could add special value of pattern_insert? With meaning "menu completion with original pattern"? Just a comment - I personally would prefer dots for options names: expand.menu, match.original etc. It gives more "multilevel" impression - e.g. if we decide to add more precise options to match.original, they could be match.original.foo, match.original.bar etc. And it is so Tcl'ish ... :-) cheers /andrej