zsh-workers
 help / color / mirror / code / Atom feed
From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.dk
Subject: all-matches with a suffix
Date: Tue, 14 Aug 2001 14:11:38 +0200	[thread overview]
Message-ID: <15225.5498.824188.845@gargle.gargle.HOWL> (raw)
In-Reply-To: <OF8840F9F6.B6682A73-ON80256AA7.00697312@uk.jpmorgan.com>


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


       reply	other threads:[~2001-08-14 12:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <OF8840F9F6.B6682A73-ON80256AA7.00697312@uk.jpmorgan.com>
2001-08-14 12:11 ` Sven Wischnowsky [this message]
2001-08-16 10:28 martin.ebourne
2001-08-16 10:57 ` Sven Wischnowsky

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=15225.5498.824188.845@gargle.gargle.HOWL \
    --to=wischnow@informatik.hu-berlin.de \
    --cc=zsh-workers@sunsite.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).