Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
all-matches with a suffix
- X-seq: zsh-workers 15623
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: all-matches with a suffix
- Date: Tue, 14 Aug 2001 14:11:38 +0200
- In-reply-to: <OF8840F9F6.B6682A73-ON80256AA7.00697312@xxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <OF8840F9F6.B6682A73-ON80256AA7.00697312@xxxxxxxxxxxxxxx>
martin.ebourne@xxxxxxxxxxxx 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@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author