Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Two Questions



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@xxxxxxx>                  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
**********************************************************************



Messages sorted by: Reverse Date, Date, Thread, Author