From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2663 invoked from network); 14 Aug 2001 12:11:57 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 14 Aug 2001 12:11:57 -0000 Received: (qmail 16082 invoked by alias); 14 Aug 2001 12:11:50 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 15623 Received: (qmail 16071 invoked from network); 14 Aug 2001 12:11:49 -0000 From: Sven Wischnowsky Message-ID: <15225.5498.824188.845@gargle.gargle.HOWL> Date: Tue, 14 Aug 2001 14:11:38 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: zsh-workers@sunsite.dk Subject: all-matches with a suffix In-Reply-To: References: X-Mailer: VM 6.92 under 21.1 (patch 3) "Acadia" XEmacs Lucid martin.ebourne@arcordia.com wrote: > ... > > I've tracked it down to the -r (or -q) option to compadd. The completions > are added as: > > compadd -S ", " -r ", \t\n\-" -a _sql_columns > > This is so that when you complete a column name normally in the select list > it appends a comma and a space, but if you type comma or space it removes > it again. > > If I remove the -r then I get the much better: > > select environ, gid, name, suid, uid, from sysusers > > Presumably if the -r was in still, then typing space would remove that last > comma? > > Any idea what's up? Yes ;-) The problem here is that it has to cheat if you want to call it that. There is this pseudo match I've been talking about already, containing all the other matches. In order to insert that match, it inserts the other matches one by one, as if one were in a menu completion and repeatedly using accept-and-menu-complete, typing spaces between the matches. Now the `-r' option means that the suffix (-S ', ') should be removed if the next character typed is a space (or a comma, or...). So. So what do we do now? That auto-remove thing is certainly the right thing when used interactively, but for this all-matches thing... Hm, we had some discussion about all this suffix handling anyway, so maybe we should start collection other problems people see or have seen with it and then find the real solution. At least I can't see any simple solution now, without adding another option to compadd, telling it how it should behave for a-a-m-c. and that would look like a hack, somehow. Bye Sven -- Sven Wischnowsky wischnow@informatik.hu-berlin.de