zsh-workers
 help / color / mirror / code / Atom feed
From: Borsenkow Andrej <Andrej.Borsenkow@mow.siemens.ru>
To: Zsh hackers list <zsh-workers@sunsite.dk>
Subject: problem with quoting in completion function
Date: 14 Apr 2002 00:16:15 +0400	[thread overview]
Message-ID: <1018728981.6553.7.camel@localhost.localdomain> (raw)


This applies to 4.0.4 as distributed by Mandrake.

I spent some time trying to understand why the following (suggested by
Sven) does not work:

 compset -P "*,"
 all_sources=( ${all_sources:#(${~IPREFIX//,/|})} )

The intention being to remove already present matches (separated by
comma) from list of possible matches.

It turned out, completion internally quotes IPREFIX, and in my case it
had spaces inside (like "Installation CD") so pattern never matched.
I.e. it tried to match

Installation\ CD

against

Installation CD

If this quoting is intentional it does not seem to be described in
documentation. But I still do not like it, it comes unexpected enough.
It makes it impossible to simply  compare strings.

I had to finally do

    compset -P "*,"
    for i in ${(s:,:)IPREFIX}; do
        eval "all_sources=( \${all_sources:#$i} )"
    done

but that is just ugly.

-andrej




             reply	other threads:[~2002-04-13 20:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-13 20:16 Borsenkow Andrej [this message]
2002-04-13 20:23 ` Borsenkow Andrej
2002-04-14  5:03   ` Bart Schaefer
2002-04-16  7:59 ` 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=1018728981.6553.7.camel@localhost.localdomain \
    --to=andrej.borsenkow@mow.siemens.ru \
    --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).