Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: update elinks completer
- X-seq: zsh-workers 28051
- From: Doug Kearns <dougkearns@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: PATCH: update elinks completer
- Date: Tue, 22 Jun 2010 10:46:31 +1000
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:content-type :date:message-id:mime-version:x-mailer:content-transfer-encoding; bh=pdofsb+EmO/K2ayWw68lscSSqnw/6U1rLmFj/FhKLmc=; b=DIEADfhsbdSsgACWwUcKEQApjZ20oozEOyVniD0H++nOuNVG/G7PXzMfSE/wQlnvZM it+wTtAZTTBvcBURxgpnaapr8Y5iYI0lRpBD1aU8qleIUEAByyAGRy2GDV8uwpRGQ4xS 32vxy+MrZGS4RjtRY7C85KJ6J3SFJ7EDwj1jY=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:content-type:date:message-id:mime-version:x-mailer :content-transfer-encoding; b=otXzEXi/0eNcYnP3QaY31GecT6Lam40Xox4gC3PgdcYGjCPL+YEHmWAwCwA1k30DoP 7H1BseBGuAaenontIYl+K5d+fjE7KaLdblQANSpeZDVcQCv38lOhfFv/1C/1ZlAQlr0f RrurpfmrFZGNEyCH5HTLnuQInaIBf875IP31w=
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
This is an update for 0.12pre5.
Regards,
Doug
Index: Completion/Unix/Command/_elinks
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_elinks,v
retrieving revision 1.9
diff -u -r1.9 _elinks
--- Completion/Unix/Command/_elinks 26 Jul 2004 16:59:54 -0000 1.9
+++ Completion/Unix/Command/_elinks 22 Jun 2010 00:01:12 -0000
@@ -1,6 +1,6 @@
#compdef elinks
-# ELinks 0.9.0 - Text WWW browser
+# ELinks 0.12pre5
local curcontext="$curcontext" state line ret=1
typeset -A opt_args
@@ -8,40 +8,55 @@
_arguments -C -A '-*' \
'*-anonymous[restrict to anonymous mode]::boolean:(0 1)' \
'*-auto-submit[autosubmit first form]::boolean:(0 1)' \
- '*-base-session[clone session with given ID]:ID number:' \
- '*-confdir[set config dir to given string]:configuration directory:_files -/' \
- '*-conffile[configuration file name]:configuration file:_files' \
- '*-default-mime-type[MIME type to assume for documents]:MIME type:_mime_types' \
- '*-dump[write formatted version of given URL to stdout]::boolean:(0 1)' \
+ '*-base-session[clone internal session with given ID]:ID number:' \
+ '*-config-dir[name of directory with configuration file]:configuration directory:_files -/' \
+ '(- 1)-config-dump[print default configuration file to stdout]' \
+ '*-config-file[name of configuration file]:configuration file:_files' \
+ '*-default-mime-type[MIME type assumed for unknown document types]:MIME type:_mime_types' \
+ '*-default-keys[ignore user-defined keybindings]::boolean:(0 1)' \
+ '*-dump[print formatted versions of given URLs to stdout]::boolean:(0 1)' \
'*-dump-charset[codepage to use with -dump]:codepage:' \
+ '-dump-color-mode[color mode used with -dump]:color mode:((-1\:standard\ dump\ mode 0\:mono\ mode 1\:16\ color\ mode 2\:88\ color\ mode 3\:256\ color\ mode 4\:true\ color\ mode))' \
'*-dump-width[width of document formatted with -dump]:width:' \
- '*-eval[evaluate given configuration option]:configuration option:' \
- '*-force-html[assume the file is HTML]' \
+ '*-eval[evaluate configuration file directive]:configuration option:' \
+ '*-force-html[interpret documents of unknown types as HTML]' \
'(- 1)-'{\?,h,help}'[print usage help and exit]' \
+ '*-localhost[only permit local connections]::boolean:(0 1)' \
'(- 1)-long-help[print detailed usage help and exit]' \
'(- 1)-config-help[print help for configuration options]' \
'(- 1)-lookup[look up specified host]:host:_hosts' \
'*-no-connect[run as separate instance]::boolean:(0 1)' \
"*-no-home[don't use files in ~/.elinks]::boolean:(0 1)" \
+ '*-no-numbering[disable link numbering in dump output]::boolean:(0 1)' \
+ '*-no-references[disable printing of link references in dump output]::boolean:(0 1)' \
+ '*-remote[control an already running ELinks]:*:command:->remote' \
'*-session-ring[connect to session ring with given ID]:ID number:' \
- '*-source[write the source of given URL to stdout]::boolean:(0 1)' \
+ '*-source[print the source of given URLs to stdout]::boolean:(0 1)' \
'(1)*-stdin[read document from stdin]::boolean:(0 1)' \
- '*-no-numbering[do not number links in dump output]::boolean:(0 1)' \
'*-touch-files[touch files in ~/.elinks when running with -no-connect/-session-ring]::boolean:(0 1)' \
+ '*-verbose[verbose level]:verbosity level:((0\:serious\ errors 1\:serious\ errors\ and\ warnings 2\:all\ messages ))' \
'(- 1)-version[print version information and exit]' \
'1:URL:->url' && ret=0
if [[ "$state" = url ]]; then
- local elinks_bookmarks
+ local -a bookmarks
+ local file=${opt_args[-config-dir]:-${ELINKS_CONFDIR:-~/.elinks}}/bookmarks
- if [[ -s ~/.elinks/bookmarks ]]; then
- elinks_bookmarks=( $(cut -f2 ~/.elinks/bookmarks) )
+ if [[ -s $file ]]; then
+ bookmarks=( ${${${(f)"$(< $file)"}#* }%% *} )
fi
_alternative \
'files:file:_files' \
- 'bookmarks:bookmark:compadd -a elinks_bookmarks' \
- 'urls:URL:_urls' && return
+ 'bookmarks:bookmark:compadd -a bookmarks' \
+ 'urls:URL:_urls' && ret=0
+elif [[ "$state" = remote ]]; then
+ local -a commands
+ commands=( ping openURL addBookmark infoBox xfeDoCommand )
+
+ _alternative \
+ 'commands:command:compadd -a commands' \
+ 'urls:URL:_urls' && ret=0
fi
return ret
Messages sorted by:
Reverse Date,
Date,
Thread,
Author