From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: "ZSH workers mailing list" <zsh-workers@sunsite.auc.dk>
Subject: PATCH: Re: something wrong with _arguments wordsplitting
Date: Sat, 6 May 2000 18:30:48 +0000 [thread overview]
Message-ID: <1000506183049.ZM6362@candle.brasslantern.com> (raw)
In-Reply-To: <000a01bfb740$081e59e0$21c9ca95@mow.siemens.ru>
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
prev parent reply other threads:[~2000-05-06 18:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-05-06 9:47 Andrej Borsenkow
2000-05-06 18:30 ` Bart Schaefer [this message]
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=1000506183049.ZM6362@candle.brasslantern.com \
--to=schaefer@candle.brasslantern.com \
--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).