zsh-workers
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: Oliver Kiddle <opk@u.genie.co.uk>,
	Zsh workers <zsh-workers@sunsite.auc.dk>
Subject: Re: PATCH: _groups and _condition
Date: Sun, 12 Mar 2000 21:36:29 +0000	[thread overview]
Message-ID: <1000312213629.ZM28219@candle.brasslantern.com> (raw)
In-Reply-To: <38CBB634.816D2213@u.genie.co.uk>

On Mar 12,  3:22pm, Oliver Kiddle wrote:
} Subject: PATCH: _groups and _condition
}
} Also here, is a patch against _condition so that it completes only files
} after more of its options.

This question isn't really directed at Oliver, but:

Out of curiosity, why doesn't _condition complete any of the options
themselves?  E.g. If I do

	zsh% [[ -<TAB>

it just inserts a space.  I expected it to list -n, -z, -t, etc.

} Incidentally, I had a look at whether it would be possible to add a
} completion for test and, more specifically, the '[' builtin. Putting
} [ or \[ after #compdef doesn't work.

I can't see any reason why it shouldn't.  (The form with no backslash.)
It works for me.  Did you remember to remove your ~/.zcompdump file?

} I can't use '[' as a key to an
} associative array if I use an assignment like: foo[\[]=whatever though
} it works fine if I do: a='[';foo[$a]=whatever or use an array style
} assignment.

That's because the string inside [ ] isn't tokenized yet at the point
where foo[\[] is tested by isident().  As a result, skipparens() finds
what appear to be unbalanced brackets.  This is a known bug with the
parser, resulting from the way associative arrays were grafted on.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com


  parent reply	other threads:[~2000-03-12 21:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-03-12 15:22 Oliver Kiddle
2000-03-12 15:30 ` Oliver Kiddle
2000-03-12 22:34   ` Bart Schaefer
2000-03-12 21:36 ` Bart Schaefer [this message]
2000-03-13 12:17 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=1000312213629.ZM28219@candle.brasslantern.com \
    --to=schaefer@candle.brasslantern.com \
    --cc=opk@u.genie.co.uk \
    --cc=zsh-workers@sunsite.auc.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).