* PATCH: broken _netscape
@ 1999-11-22 16:08 Oliver Kiddle
1999-11-22 17:44 ` Problems with "comparguments" (Re: PATCH: broken _netscape) Bart Schaefer
0 siblings, 1 reply; 2+ messages in thread
From: Oliver Kiddle @ 1999-11-22 16:08 UTC (permalink / raw)
To: Zsh workers
_netscape in pws-9 seems to be broken. This patch fixes it to a point
where it atleast runs without errors but for some reason, completion of
the arguments doesn't work. I suspect that it is a bug somewhere in
_arguments.
Oliver
--- Completion/User/_netscape.bak Mon Nov 22 15:30:21 1999
+++ Completion/User/_netscape Mon Nov 22 15:57:20 1999
@@ -43,7 +43,6 @@
_wanted types expl 'data type' &&
compadd -s")" -M 'm:{a-zA-Z}={A-Za-z}' HTML Text PostScript &&
ret=0
- fi
else
_tags files && _path_files -W ~ && ret=0
fi
@@ -53,19 +52,17 @@
if compset -P '*@'; then
_wanted hosts expl 'remote host name' &&
_hosts "$expl[@]" -q -S, && ret=0
- fi
else
_wanted users expl 'login name' && _users "$expl[@]" -q -S@ && ret=0
- fi
fi
;;
*)
if _wanted commands expl 'remote commands'; then
- if [[ "$QIPREFIX" ]]; then
- compadd "$expl[@]" -qS '(' -M 'm:{a-zA-Z}={A-Za-z}' - \
+ if [[ -z "$QIPREFIX" ]]; then
+ compadd "$expl[@]" -s'(' -S '' -M 'm:{a-zA-Z}={A-Za-z}' - \
$remote_commands && ret=0
else
- compadd "$expl[@]" -s'(' -S '' -M 'm:{a-zA-Z}={A-Za-z}' - \
+ compadd "$expl[@]" -qS '(' -M 'm:{a-zA-Z}={A-Za-z}' - \
$remote_commands && ret=0
fi
fi
@@ -75,7 +72,7 @@
if [[ "$state" = "urls" ]]; then
# Complete netscape urls
- if compset about: ; then
+ if compset -P about: ; then
_wanted values expl 'about what' &&
compadd authors blank cache document fonts global hype image-cache \
license logo memory-cache mozilla plugins && ret=0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Problems with "comparguments" (Re: PATCH: broken _netscape)
1999-11-22 16:08 PATCH: broken _netscape Oliver Kiddle
@ 1999-11-22 17:44 ` Bart Schaefer
0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 1999-11-22 17:44 UTC (permalink / raw)
To: Zsh workers
On Nov 22, 4:08pm, Oliver Kiddle wrote:
} Subject: PATCH: broken _netscape
}
} _netscape in pws-9 seems to be broken. This patch fixes it to a point
} where it atleast runs without errors but for some reason, completion of
} the arguments doesn't work. I suspect that it is a bug somewhere in
} _arguments.
I may be entirely wrong, but based on a scan through the "set -x" output
when completing after "netscape -", I'd say this is the same bug that is
causing "cvs" to complete --allow-root and the directories after it. I
suspect a parsing bug in "comparguments".
While we're on the topic, I noticed this in the manual page for "rxvt" the
other day:
-pixmap: file[;geom]
Specify XPM file for the background and also
optionally specify its scaling with a geometry
string. Note you may need to add quotes to avoid
special shell interpretation of the `;' in the com-
mand-line; resource backgroundPixmap.
Note that here we have an option whose name actually includes a colon. As
far as I can tell there's *no* way to represent this in the argument list
for _arguments or comparguments; perhaps _regex_arguments could deal with
it, but it doesn't appear so from a look at _apt.
The mini-language of _arg_compile could handle it:
_arg_compile args option -pixmap: follow next \
explain "file[;scaling]" \
means "XPM file for the background" \
action etc.
(I'm not sure how to specify the "action" for "complete files before a
semicolon, with a quoted semicolon as the auto-suffix, and geometries
after the semicolon", and I don't have time to work it out right now.
I'd love to see it done, though.) However, since _arg_compile presently
doesn't do anything but paste together things to pass to _arguments, it
isn't helpful that it can initially parse it ...
--
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:[~1999-11-22 17:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-11-22 16:08 PATCH: broken _netscape Oliver Kiddle
1999-11-22 17:44 ` Problems with "comparguments" (Re: PATCH: broken _netscape) 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).