Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: xmllint completion
- X-seq: zsh-workers 18257
- From: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- To: Doug Kearns <djkea2@xxxxxxxxxxxxxxxxxxxxxxx>
- Subject: Re: PATCH: xmllint completion
- Date: Tue, 18 Feb 2003 11:35:00 +0100
- Cc: zsh-workers@xxxxxxxxxx
- In-reply-to: <20030218061442.GA17147@xxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20030218061442.GA17147@xxxxxxxxxxxxxxxxxxxxx>
- Sender: kiddleo@xxxxxxxxxx
On 18 Feb, Doug Kearns wrote:
>
> Here's a new completion function for xmllint which comes with the
> libxml2 library - http://xmlsoft.org/
Thanks, I've added this. We should perhaps clump it together with
_xsltproc in an _xmlsoft (any views?). An xmlcatalog completion if/when
written could go in there too.
On 4.1 only, I'll apply the following patch on top of it. It just makes
it call _webbrowser (formerly would have been _urls -f; see 16323)
instead of repeating the content of _webbrowser in a state. 16323 is not
on 4.0 so I'll just add in the missing `local state line
curcontext="$curcontext"' and _arguments -C for 4.0.
Oliver
Index: _xmllint
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_xmllint,v
retrieving revision 1.1
diff -u -r1.1 _xmllint
--- _xmllint 18 Feb 2003 10:02:55 -0000 1.1
+++ _xmllint 18 Feb 2003 10:09:15 -0000
@@ -35,7 +35,7 @@
'--nowrap[do not put HTML doc wrapper]' \
'--valid[validate the document in addition to std well-formed check]' \
'(--dtdvalid --relaxng)--postvalid[do a posteriori validation, i.e after parsing]' \
- '(--postvalid --relaxng)--dtdvalid[do a posteriori validation against a given DTD]:DTD:->url' \
+ '(--postvalid --relaxng)--dtdvalid[do a posteriori validation against a given DTD]:DTD:_webbrowser' \
'--timing[print some timings]' \
'(--noout --output -o)'{--output,-o}'[save to a given file]:output file:_files' \
'--repeat[repeat 100 times, for timing or profiling]' \
@@ -59,13 +59,5 @@
'--dropdtd[remove the DOCTYPE of the input docs]' \
'--stream[use the streaming interface to process very large files]' \
'--chkregister[verify the node registration code]' \
- '(--dtdvalid --postvalid)--relaxng[do RelaxNG validation against the schema]:schema:->url' \
- '*:XML file:->url' && return
-
-if [[ "$state" = url ]]; then
- _alternative \
- 'files:file:_files' \
- 'urls:url:_urls' && return
-fi
-
-return 1
+ '(--dtdvalid --postvalid)--relaxng[do RelaxNG validation against the schema]:schema:_webbrowser' \
+ '*:XML file:_webbrowser'
This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author