From: Peter Stephenson <pws@pwstephenson.fsnet.co.uk>
To: zsh-workers@sunsite.auc.dk (Zsh hackers list)
Subject: Re: Correction oddity
Date: Thu, 16 Aug 2001 01:16:44 +0100 [thread overview]
Message-ID: <20010816001649.1729214284@pwstephenson.fsnet.co.uk> (raw)
In-Reply-To: "Peter Stephenson"'s message of "Thu, 16 Aug 2001 00:50:08 BST." <20010815235013.940CD14284@pwstephenson.fsnet.co.uk>
Peter Stephenson wrote:
> the _urls function (we're at line 74,
Forget that, we've finished _urls. We're executing this in _arguments:
compadd -M "$matcher" -D equal - "${(@)equal%%:*}"
The redefined compadd:
compadd() {
[[ ${argv[(I)-[a-zA-Z]#U[a-zA-Z]#]} -eq 0 &&
"${#:-$PREFIX$SUFFIX}" -le _comp_correct ]] && return
### This distinction doesn't seem to be needed anymore
# if [[ "$PREFIX" = \~*/* ]]; then
# PREFIX="${PREFIX%%/*}/(#a${_comp_correct})${PREFIX#*/}"
# else
PREFIX="(#a${_comp_correct})$PREFIX"
# fi
(( $_correct_group )) && _correct_expl[_correct_group]=${argv[(R)-*[JV]]}
builtin compadd "$_correct_expl[@]" "$@"
}
finds _correct_group is 3; I presume this is the index of the -J or -V
argument in the compadd command,
compadd -M m:{a-zA-Z}={A-Za-z} -M corrections \
-X Completing corrections -M r:|[_-]=* r:|=* -D equal -
and indeed it is that `-M' which should be -J or -V. Unfortunately it
becomes -M because there's no -J or -V in the argument list, and in that
case ${argv[(R)-*[JV]]} returns the first argument --- dunno if that's a
bug, it doesn't seem so hot, but it's presumably not the root bug.
Getting that test to check if the reverse match turned up something
sensible might be a start, but I'm way out of my depth.
--
Peter Stephenson <pws@pwstephenson.fsnet.co.uk>
Work: pws@csr.com
Web: http://www.pwstephenson.fsnet.co.uk
next prev parent reply other threads:[~2001-08-15 23:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-08-15 23:50 Peter Stephenson
2001-08-16 0:16 ` Peter Stephenson [this message]
2001-08-16 8:05 ` PATCH: " Sven Wischnowsky
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=20010816001649.1729214284@pwstephenson.fsnet.co.uk \
--to=pws@pwstephenson.fsnet.co.uk \
--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).