Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: Re: something wrong with _arguments wordsplitting
- X-seq: zsh-workers 11236
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: "ZSH workers mailing list" <zsh-workers@xxxxxxxxxxxxxx>
- Subject: PATCH: Re: something wrong with _arguments wordsplitting
- Date: Sat, 6 May 2000 18:30:48 +0000
- In-reply-to: <000a01bfb740$081e59e0$21c9ca95@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <000a01bfb740$081e59e0$21c9ca95@xxxxxxxxxxxxxx>
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author