From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: Re: Another _arguments problem.
Date: Tue, 2 Nov 1999 14:52:03 +0100 (MET) [thread overview]
Message-ID: <199911021352.OAA31688@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: Tanaka Akira's message of 02 Nov 1999 22:02:37 +0900
Tanaka Akira wrote:
> I found another _arguments problem, maybe.
>
> ...
>
> The description for "-V" should be displayed. Because the option "-N"
> takes optional arguments and "V" is treated as an argument for "-N".
Yep. Small off-by-one thinko.
I also found a small display bug with completion lists and two
references to old function names (i.e. uses of functions that have
been renamed). Sorry for the latter, but this machine always complains
about all unknown functions and variables (which are many) so I can't
easily see if there are typos or something like that somewhere. I only
just discovered that it complains about unknown functions when I
unload a module (it doesn't do that when I load the module, oh well...).
I found the display bug when trying `_netscape' and `_urls'. The
latter had some other problems: at one point host names were completed
without a `_description', leaving me with two groups with the same
matches, one with a explanation string, one without. Another problem
was that it used a local parameter `hosts' and `_hosts' then set that,
ignoring the globally set `hosts' parameter. Certainly not the right
thing.
Bye
Sven
diff -u -r oldsrc/Modules/parameter.c Src/Modules/parameter.c
--- oldsrc/Modules/parameter.c Tue Nov 2 13:07:00 1999
+++ Src/Modules/parameter.c Tue Nov 2 14:22:20 1999
@@ -1781,7 +1781,7 @@
static void
scanpmdisgaliases(HashTable ht, ScanFunc func, int flags)
{
- scanpmaliases(ht, func, flags, 1, DISABLED);
+ scanaliases(ht, func, flags, 1, DISABLED);
}
/* Table for defined parameters. */
diff -u -r oldsrc/Zle/compcore.c Src/Zle/compcore.c
--- oldsrc/Zle/compcore.c Tue Nov 2 12:02:10 1999
+++ Src/Zle/compcore.c Tue Nov 2 14:21:48 1999
@@ -334,7 +334,7 @@
while (1) {
if (!first)
- acceptlast();
+ accept_last();
first = 0;
if (!--nm)
diff -u -r oldsrc/Zle/compresult.c Src/Zle/compresult.c
--- oldsrc/Zle/compresult.c Tue Nov 2 12:02:11 1999
+++ Src/Zle/compresult.c Tue Nov 2 14:25:17 1999
@@ -1042,7 +1042,7 @@
} else {
if (oldlist) {
if (oldins && minfo.cur)
- acceptlast();
+ accept_last();
} else
minfo.cur = NULL;
}
@@ -1798,10 +1798,11 @@
q = skipnolist(q + 1);
mc++;
}
- while (i-- > 0)
- printm(g, NULL, mc++, ml, (!i),
+ while (i-- > 0) {
+ printm(g, NULL, mc, ml, (!i),
(g->widths ? g->widths[mc] : g->width), NULL, NULL);
-
+ mc++;
+ }
if (n) {
putc('\n', shout);
ml++;
diff -u -r oldsrc/Zle/computil.c Src/Zle/computil.c
--- oldsrc/Zle/computil.c Tue Nov 2 12:02:11 1999
+++ Src/Zle/computil.c Tue Nov 2 14:41:30 1999
@@ -1035,7 +1035,7 @@
state.optbeg = state.argbeg = state.inopt = cur;
state.singles = (!pe || !*pe);
- for (p = line + 1; p <= pe; p++) {
+ for (p = line + 1; p < pe; p++) {
if ((tmpopt = d->single[STOUC(*p)])) {
PERMALLOC {
state.oargs[tmpopt->num] = newlinklist();
diff -u -r oldcompletion/User/_urls Completion/User/_urls
--- oldcompletion/User/_urls Mon Nov 1 09:03:08 1999
+++ Completion/User/_urls Tue Nov 2 14:33:40 1999
@@ -37,7 +37,7 @@
# name used by a user placing web pages within their home area.
# e.g. compconf urls_localhttp=www:/usr/local/apache/htdocs:public_html
-local ipre scheme host user hosts ret=1 expl
+local ipre scheme host user uhosts ret=1 expl
local urls_path="${compconfig[urls_path]:-${ZDOTDIR:-$HOME}/.zsh/urls}"
local localhttp_servername="${${(@s.:.)compconfig[urls_localhttp]}[1]}"
local localhttp_documentroot="${${(@s.:.)compconfig[urls_localhttp]}[2]}"
@@ -93,10 +93,11 @@
# Complete hosts
if ! compset -P '(#b)([^/]#)/'; then
- hosts=($urls_path/$scheme/$PREFIX*$SUFFIX(/:t))
- (( $#hosts )) || _hosts -S/ && ret=0
- [[ "$scheme" = http ]] && hosts=($hosts $localhttp_servername)
- compadd "$@" -QS/ - $hosts && ret=0
+ uhosts=($urls_path/$scheme/$PREFIX*$SUFFIX(/:t))
+ (( $#uhosts )) || _hosts -S/ && ret=0
+ [[ "$scheme" = http ]] && uhosts=($uhosts $localhttp_servername)
+ _description expl host
+ compadd "$expl[@]" "$@" -QS/ - $uhosts && ret=0
return $ret
fi
host="$match[1]"
--
Sven Wischnowsky wischnow@informatik.hu-berlin.de
next reply other threads:[~1999-11-02 13:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-11-02 13:52 Sven Wischnowsky [this message]
-- strict thread matches above, loose matches on Subject: below --
2000-02-08 13:55 another " Sven Wischnowsky
2000-02-08 13:11 Tanaka Akira
1999-11-02 13:02 Another " Tanaka Akira
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=199911021352.OAA31688@beta.informatik.hu-berlin.de \
--to=wischnow@informatik.hu-berlin.de \
--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).