zsh-users
 help / color / mirror / code / Atom feed
From: Peter Stephenson <pws@csr.com>
To: Zsh users list <zsh-users@sunsite.dk>
Subject: Re: Two Questions
Date: Tue, 02 Mar 2004 11:33:49 +0000	[thread overview]
Message-ID: <20748.1078227229@csr.com> (raw)
In-Reply-To: "Nikolai Weibull"'s message of "Tue, 02 Mar 2004 12:14:25 +0100." <20040302111425.GG1981@puritan.pcp.ath.cx>

Nikolai Weibull wrote:
> Sorry for responding before actually testing, but after testing it
> proves to be insufficient.  It simply ignores the = on the command line
> now, restarting all completion instead of taking the = into account.
> Say I have a directory with the file
> 	=README
> in it (yes this is an Arch managed source tree) that I want to read with
> vim. I thus type
> 	% vim =<tab>
> which simply lists
> 	\=README
> under 'files'.

This seems to be a fully paid up bug...  I think it's simply that
this chunk in _main_complete isn't testing for the option before
trying to make `=' special.  (Leading `=' should now work regardless
of magicequalsubst --- it seems that's already smart enough to match
a non-leading `='.)

Index: Completion/Base/Core/_main_complete
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Base/Core/_main_complete,v
retrieving revision 1.8
diff -u -r1.8 _main_complete
--- Completion/Base/Core/_main_complete	1 Aug 2003 16:29:21 -0000	1.8
+++ Completion/Base/Core/_main_complete	2 Mar 2004 11:24:04 -0000
@@ -57,7 +57,7 @@
 # Special completion contexts after `~' and `='.
 
 if [[ -z "$compstate[quote]" ]]; then
-  if compset -P 1 '='; then
+  if [[ -o equals ]] && compset -P 1 '='; then
     compstate[context]=equal
   elif [[ "$PREFIX" != */* && "$PREFIX[1]" = '~' ]]; then
     compset -p 1

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK                          Tel: +44 (0)1223 692070


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************


  reply	other threads:[~2004-03-02 11:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20040302104703.GC1981@puritan.pcp.ath.cx>
2004-03-02 10:58 ` Peter Stephenson
2004-03-02 11:07   ` Nikolai Weibull
2004-03-02 11:14     ` Nikolai Weibull
2004-03-02 11:33       ` Peter Stephenson [this message]
2004-03-02 11:48         ` Nikolai Weibull
1998-01-27 15:06 Two questions Bernd Eggink

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=20748.1078227229@csr.com \
    --to=pws@csr.com \
    --cc=zsh-users@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).