zsh-workers
 help / color / mirror / code / Atom feed
* something wrong with _arguments wordsplitting
@ 2000-05-06  9:47 Andrej Borsenkow
  2000-05-06 18:30 ` PATCH: " Bart Schaefer
  0 siblings, 1 reply; 2+ messages in thread
From: Andrej Borsenkow @ 2000-05-06  9:47 UTC (permalink / raw)
  To: ZSH workers mailing list

SOCKS5 v1.0r10:

bor@itsrm2% CFLAGS=-O ./configure --prefix=/tools --help    
Usage: configure [options] [host]
Options: [defaults in brackets after descriptions]
   ...
--with-static           Turn on static compiling
   ...
bor@itsrm2% CFLAGS=-O ./configure --prefix=/tools --with-st<TAB>
bor@itsrm2% CFLAGS=-O ./configure --prefix=/tools --with-staticTurn

Oops! Hmm, may be, there are TABs in between?        

-andrej

Have a nice DOS!
B >> 


^ permalink raw reply	[flat|nested] 2+ messages in thread

* PATCH: Re: something wrong with _arguments wordsplitting
  2000-05-06  9:47 something wrong with _arguments wordsplitting Andrej Borsenkow
@ 2000-05-06 18:30 ` Bart Schaefer
  0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 2000-05-06 18:30 UTC (permalink / raw)
  To: ZSH workers mailing list

On May 6,  1:47pm, Andrej Borsenkow wrote:
} Subject: something wrong with _arguments wordsplitting
}
} bor@itsrm2% CFLAGS=-O ./configure --prefix=/tools --with-st<TAB>
} bor@itsrm2% CFLAGS=-O ./configure --prefix=/tools --with-staticTurn
} 
} Oops! Hmm, may be, there are TABs in between?        

That does appear to have been it.  This should fix it.

The comma wasn't necessary in the final pattern any more, was it?  All
the commas should be zapped by then.

Index: Completion/Base/_arguments
===================================================================
@@ -60,16 +60,16 @@
     # The parameter expansion trickery first gets the lines as separate
     # array elements. Then we select all lines whose first non-blank
     # character is a hyphen. Since some commands document more than one
-    # option per line, separated by commas, we convert commas int
+    # option per line, separated by commas, we convert commas into
     # newlines and then split the result again at newlines after joining 
     # the old array elements with newlines between them. Then we select
     # those elements that start with two hyphens, remove anything up to
-    # those hyphens and anything from the space or comma after the
-    # option up to the end. 
+    # those hyphens and anything from the space or tab after the
+    # option up to the end.
 
     lopts=("--${(@)^${(@)${(@)${(@M)${(@ps:\n:j:\n:)${(@)${(@M)${(@f)$(_call options ${~words[1]} --help 2>&1)//\[--/
 --}:#[ 	]#-*}//,/
-}}:#[ 	]#--*}#*--}%%[], ]*}:#}")
+}}:#[ 	]#--*}#*--}%%[]	 ]*}:#}")
     lopts=( "${(@)lopts:#--}" )
 
     # Now remove all ignored options ...

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2000-05-06 18:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-05-06  9:47 something wrong with _arguments wordsplitting Andrej Borsenkow
2000-05-06 18:30 ` PATCH: " Bart Schaefer

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).