zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: elinks completion
@ 2003-01-26 14:32 Doug Kearns
  2003-02-03 12:10 ` Clemens Fischer
  0 siblings, 1 reply; 2+ messages in thread
From: Doug Kearns @ 2003-01-26 14:32 UTC (permalink / raw)
  To: zsh-workers

[-- Attachment #1: Type: text/plain, Size: 75 bytes --]

G'day all,

Attached is a completion function for 'elinks'.

Regards,
Doug

[-- Attachment #2: _elinks --]
[-- Type: text/plain, Size: 1612 bytes --]

#compdef elinks

#ELinks 0.4.1 - Text WWW browser

local curcontext="$curcontext" state line
typeset -A opt_args

_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:' \
	'*-dump[Write formatted version of given URL to stdout]:boolean:(0 1)' \
	'*-dump-charset[Codepage to use with -dump]:codepage:' \
	'*-dump-width[Width of document formatted with -dump]:width:' \
	'*-eval[Evaluate given configuration option]:configuration option:' \
	'(- 1)-'{\?,h,help}'[Print usage help and exit]' \
	'(- 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)' \
	'*-session-ring[Connect to session ring with given ID]:ID number:' \
	'*-source[Write the source of given URL to stdout]:boolean:(0 1)' \
	'(1)*-stdin[Read document from stdin]:boolean:(0 1)' \
	'*-touch-files[Touch files in ~/.elinks when running with -no-connect/-session-ring]:boolean:(0 1)' \
	'(- 1)-version[Print version information and exit]' \
	'1:url:->url'

if [[ "$state" = url ]]; then
	local elinks_bookmarks elinks_urls

	if [[ -s ~/.elinks/bookmarks ]]; then
		elinks_bookmarks=( $( cut -f2 ~/.elinks/bookmarks ) )
	fi

	elinks_urls=(
		'files:file:_files' \
		'bookmarks:bookmark:compadd -a elinks_bookmarks' \
		'urls:url:_urls'
	)

	_alternative "$elinks_urls[@]"
fi

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: PATCH: elinks completion
  2003-01-26 14:32 PATCH: elinks completion Doug Kearns
@ 2003-02-03 12:10 ` Clemens Fischer
  0 siblings, 0 replies; 2+ messages in thread
From: Clemens Fischer @ 2003-02-03 12:10 UTC (permalink / raw)
  To: zsh-workers

Doug Kearns <djkea2@mugca.its.monash.edu.au>:

> Attached is a completion function for 'elinks'.

thanks.  but i'm sure people would appreciate a name and a date (and
possibly the place it was posted to) as comments in contributions.

i'm in the habit of providing pointers like this as backlinks to where
i found stuff, and that it is contributed, not distribution-provided
etc.

you're too modest  :)

  clemens


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-02-03 13:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-26 14:32 PATCH: elinks completion Doug Kearns
2003-02-03 12:10 ` Clemens Fischer

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).