zsh-users
 help / color / mirror / code / Atom feed
From: "Zvi Har'El" <rl@math.technion.ac.il>
To: Lloyd Zusman <ljz@asfast.com>
Cc: zsh-users@sunsite.dk
Subject: Re: Incomplete completion for w3m under 4.1.1
Date: Fri, 17 Oct 2003 07:50:46 +0200	[thread overview]
Message-ID: <20031017055046.GA1976@fermat.math.technion.ac.il> (raw)
In-Reply-To: <m3u16afgkn.fsf@asfast.com>

Perhaps _w3m should be fixed to resemble _lynx, i.e., the last parameter for
the _arguments function should be ':url:->html' rather then ':url:->url' .
What I do now when I wish zsh to complete files in the current directory is to
start with "w3m fi<TAB>" and next "w3m file://<TAB>" which completes the
current directory. 

On Wed, 15 Oct 2003 15:26:16 -0400, Lloyd Zusman wrote about "Incomplete completion for w3m under 4.1.1":
> The zsh-4.1.1 completion specification for the 'w3m' program
> (specification attached) is incomplete.  It will only try to complete
> the final argument if it's some sort of URL.  For example ..
> 
>   w3m [ -options ] http://some.url.goes.here
> 
> However, w3m can also properly be used in the following way:
> 
>   w3m file.html
> 
> ... where 'file.html' is a file on disk that I want to view.  However,
> zsh is not completing these cases.
> 
> How can the _w3m completion spec be changed so that both kinds of values
> can validly be completed for the final argument? ... or at least so
> that I can cause it to switch between the two types of completion
> with some sort of keystroke.    Thanks in advance.
> 

Content-Description: zsh-4.1.1 _w3m
> #compdef w3m
> 
> local curcontext="$curcontext" state line
> typeset -A opt_args
> 
> _arguments -C \
>   '-t[tabwidth]:tabwidth:' \
>   '-r[ignore backspace effect]' \
>   '-l[preserved lines]:number of lines:' \
>   '-B[load bookmark]' \
>   '-bookmark:bookmark file:_files' \
>   '-T[content-type]:content type:' \
>   '-m[internet message mode]' \
>   '-v[visual startup mode]' \
>   '-M[monochrome display]' \
>   '-F[automatically render frame]' \
>   '(-dump_source -dump_head)-dump' \
>   '-cols:column width:' \
>   '(-dump -dump_head)-dump_source' \
>   '(-dump -dump_source)-dump_head' \
>   '+:goto line:' \
>   '-num[show line number]' \
>   '-no-proxy' \
>   '-no-mouse' \
>   '(-no-cookie)-cookie' \
>   '(-cookie)-no-cookie' \
>   '-no-graph' \
>   '-S[squeeze multiple blank lines]' \
>   '-W[toggle wrap search mode]' \
>   '-X[do not use termcap init/deinit]' \
>   '-o[option]:option-value:' \
>   '-config:config file:_files' \
>   '-debug' \
>   ':url:->url' && return 0
> 
> case $state in
> 	url)
> 	local _w3mhistory
> 
> 	if [[ -s ~/.w3m/history ]]; then
> 	   _w3mhistory=(${(f)"$(<$HOME/.w3m/history)"})
> 	   compadd $_w3mhistory
> 	fi
> 
> 	_urls -f
> 	;;
> 
> esac

> 
> 
> -- 
>  Lloyd Zusman
>  ljz@asfast.com


-- 
Dr. Zvi Har'El     mailto:rl@math.technion.ac.il     Department of Mathematics
tel:+972-54-227607 icq:179294841     Technion - Israel Institute of Technology
fax:+972-4-8293388 http://www.math.technion.ac.il/~rl/     Haifa 32000, ISRAEL
"If you can't say somethin' nice, don't say nothin' at all." -- Thumper (1942)
                              Friday, 21 Tishri 5764, 17 October 2003,  7:40AM


  parent reply	other threads:[~2003-10-17  5:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-15 19:26 Lloyd Zusman
2003-10-16  9:45 ` Peter Stephenson
2003-10-21 18:29   ` Lloyd Zusman
2003-10-21 21:06     ` Lloyd Zusman
2003-10-17  5:50 ` Zvi Har'El [this message]
2003-10-21 18:30   ` Lloyd Zusman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20031017055046.GA1976@fermat.math.technion.ac.il \
    --to=rl@math.technion.ac.il \
    --cc=ljz@asfast.com \
    --cc=zsh-users@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).