about summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
Diffstat (limited to 'Completion')
-rw-r--r--Completion/Unix/Command/.distfiles4
-rw-r--r--Completion/Unix/Command/_xmllint63
-rw-r--r--Completion/Unix/Command/_xmlsoft96
-rw-r--r--Completion/Unix/Command/_xsltproc23
4 files changed, 98 insertions, 88 deletions
diff --git a/Completion/Unix/Command/.distfiles b/Completion/Unix/Command/.distfiles
index 183874506..c2a90b4bf 100644
--- a/Completion/Unix/Command/.distfiles
+++ b/Completion/Unix/Command/.distfiles
@@ -18,6 +18,6 @@ _last         _loadkeys     _ruby         _sysctl       _links        _samba
 _user_admin   _rsync        _arping	  _spamassassin _mtools       _ifconfig
 _fsh          _chkconfig    _cdcd         _irssi        _mysqldiff    _sccs
 _netcat       _larch        _texinfo	  _figlet       _elinks       _tidy
-_global       _global_tags  _ant          _lsof         _mt           _xsltproc
-_p4           _xmllint
+_global       _global_tags  _ant          _lsof         _mt           _xmlsoft
+_p4
 '
diff --git a/Completion/Unix/Command/_xmllint b/Completion/Unix/Command/_xmllint
deleted file mode 100644
index d28f77992..000000000
--- a/Completion/Unix/Command/_xmllint
+++ /dev/null
@@ -1,63 +0,0 @@
-#compdef xmllint
-
-# xmllint: using libxml version 20503
-
-local encoding
-encoding=(
-  UTF-8
-  UTF-16
-  ISO-10646-UCS-2
-  ISO-10646-UCS-4
-  ISO-8859-1
-  ISO-8859-2
-  ISO-8859-3
-  ISO-8859-4
-  ISO-8859-5
-  ISO-8859-6
-  ISO-8859-7
-  ISO-8859-8
-  ISO-8859-9
-  ISO-2022-JP
-  SHIFT_JIS
-  EUC-JP
-)
-
-_arguments \
-  '--version[display the version of the XML library used]' \
-  '--debug[dump a debug tree of the in-memory document]' \
-  '--shell[run a navigating shell]' \
-  '--debugent[debug the entities defined in the document]' \
-  '--copy[used to test the internal copy implementation]' \
-  '--recover[output what was parsable on broken XML documents]' \
-  '--noent[substitute entity references by their value]' \
-  "(--output -o)--noout[don't output the result tree]" \
-  '--htmlout[output results as HTML]' \
-  '--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:_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]' \
-  '--insert[ad-hoc test for valid insertions]' \
-  '--compress[turn on gzip compression of output]' \
-  '(--html)--sgml[use the DocBook SGML parser]' \
-  '(--sgml)--html[use the HTML parser]' \
-  '--push[use the push mode of the parser]' \
-  '--memory[parse from memory]' \
-  '--nowarning[do not emit warnings from parser/validator]' \
-  '--noblanks[drop (ignorable?) blanks spaces]' \
-  '--format[reformat/reindent the input]' \
-  '--testIO[test user I/O support]' \
-  '--encode[output in the given encoding]:encoding:(${encoding[@]})' \
-  '(--nocatalogs)--catalogs[use SGML catalogs]' \
-  '(--catalogs)--nocatalogs[deactivate all catalogs]' \
-  '--auto[generate a small doc on the fly]' \
-  '--xinclude[do XInclude processing]' \
-  '--loaddtd[fetch external DTD]' \
-  '--dtdattr[loaddtd + populate the tree with inherited attributes]' \
-  '--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:_webbrowser' \
-  '*:XML file:_webbrowser'
diff --git a/Completion/Unix/Command/_xmlsoft b/Completion/Unix/Command/_xmlsoft
new file mode 100644
index 000000000..100a0de62
--- /dev/null
+++ b/Completion/Unix/Command/_xmlsoft
@@ -0,0 +1,96 @@
+#compdef xsltproc xmllint
+
+# xmllint: using libxml version 20503
+# xsltproc: using libxslt version 10021
+
+case $service in
+  xsltproc)
+    _arguments \
+      '(-)'{--version,-V}'[show libxml and libxslt versions]' \
+      '(--verbose -v)'{--verbose,-v}"[show logs of what's happening]" \
+      '(--output -o)'{--output,-o}'[specify output file]:output file:_files' \
+      '--timing[display the time used]' \
+      '--repeat[run the transformation 20 times]' \
+      '--debug[dump the tree of the result instead]' \
+      '--dumpextensions[dump registered extension elements and functions]' \
+      '--novalid[skip the DTD loading phase]' \
+      '--noout[do not dump the result]' \
+      '--maxdepth[increase the maximum depth]:depth' \
+      '(--docbook)--html[input document is an HTML file]' \
+      '(--html)--docbook[input document is SGML docbook]' \
+      '--param[pass a parameter,value pair]:name::value (xpath expression)' \
+      '--stringparam[pass a parameter]:name::value' \
+      '--nonet[refuse to fetch DTDs or entities over network]' \
+      '--catalogs[use SGML catalogs]' \
+      '--xinclude[do XInclude processing on document input]' \
+      {--profile,--norman}'[dump profiling information]' \
+      '1:stylesheet:_files -g \*.xsl' \
+      ':file:_files -g \*.xml' && return
+  ;;
+  xmllint)
+    local curcontext="$curcontext" state line encoding
+
+    encoding=(
+      UTF-8
+      UTF-16
+      ISO-10646-UCS-2
+      ISO-10646-UCS-4
+      ISO-8859-1
+      ISO-8859-2
+      ISO-8859-3
+      ISO-8859-4
+      ISO-8859-5
+      ISO-8859-6
+      ISO-8859-7
+      ISO-8859-8
+      ISO-8859-9
+      ISO-2022-JP
+      SHIFT_JIS
+      EUC-JP
+    )
+
+    _arguments \
+      '--version[display the version of the XML library used]' \
+      '--debug[dump a debug tree of the in-memory document]' \
+      '--shell[run a navigating shell]' \
+      '--debugent[debug the entities defined in the document]' \
+      '--copy[used to test the internal copy implementation]' \
+      '--recover[output what was parsable on broken XML documents]' \
+      '--noent[substitute entity references by their value]' \
+      "(--output -o)--noout[don't output the result tree]" \
+      '--htmlout[output results as HTML]' \
+      '--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:_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]' \
+      '--insert[ad-hoc test for valid insertions]' \
+      '--compress[turn on gzip compression of output]' \
+      '(--html)--sgml[use the DocBook SGML parser]' \
+      '(--sgml)--html[use the HTML parser]' \
+      '--push[use the push mode of the parser]' \
+      '--memory[parse from memory]' \
+      '--nowarning[do not emit warnings from parser/validator]' \
+      '--noblanks[drop (ignorable?) blanks spaces]' \
+      '--format[reformat/reindent the input]' \
+      '--testIO[test user I/O support]' \
+      '--encode[output in the given encoding]:encoding:(${encoding[@]})' \
+      '(--nocatalogs)--catalogs[use SGML catalogs]' \
+      '(--catalogs)--nocatalogs[deactivate all catalogs]' \
+      '--auto[generate a small doc on the fly]' \
+      '--xinclude[do XInclude processing]' \
+      '--loaddtd[fetch external DTD]' \
+      '--dtdattr[loaddtd + populate the tree with inherited attributes]' \
+      '--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:_webbrowser' \
+      '*:XML file:_webbrowser' && return
+  ;;
+esac
+
+return 1
+
+
diff --git a/Completion/Unix/Command/_xsltproc b/Completion/Unix/Command/_xsltproc
deleted file mode 100644
index ff83c735e..000000000
--- a/Completion/Unix/Command/_xsltproc
+++ /dev/null
@@ -1,23 +0,0 @@
-#compdef xsltproc
-
-_arguments \
-  '(-)'{--version,-V}'[show libxml and libxslt versions]' \
-  '(--verbose -v)'{--verbose,-v}"[show logs of what's happening]" \
-  '(--output -o)'{--output,-o}'[specify output file]:output file:_files' \
-  '--timing[display the time used]' \
-  '--repeat[run the transformation 20 times]' \
-  '--debug[dump the tree of the result instead]' \
-  '--dumpextensions[dump registered extension elements and functions]' \
-  '--novalid[skip the DTD loading phase]' \
-  '--noout[do not dump the result]' \
-  '--maxdepth[increase the maximum depth]:depth' \
-  '(--docbook)--html[input document is an HTML file]' \
-  '(--html)--docbook[input document is SGML docbook]' \
-  '--param[pass a parameter,value pair]:name::value (xpath expression)' \
-  '--stringparam[pass a parameter]:name::value' \
-  '--nonet[refuse to fetch DTDs or entities over network]' \
-  '--catalogs[use SGML catalogs]' \
-  '--xinclude[do XInclude processing on document input]' \
-  {--profile,--norman}'[dump profiling information]' \
-  '1:stylesheet:_files -g \*.xsl' \
-  ':file:_files -g \*.xml'