From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8492 invoked from network); 17 Oct 2003 05:51:18 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 17 Oct 2003 05:51:18 -0000 Received: (qmail 22814 invoked by alias); 17 Oct 2003 05:50:58 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6715 Received: (qmail 22771 invoked from network); 17 Oct 2003 05:50:58 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 17 Oct 2003 05:50:58 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [132.68.115.6] by sunsite.dk (MessageWall 1.0.8) with SMTP; 17 Oct 2003 5:50:57 -0000 Received: from fermat.math.technion.ac.il (localhost [127.0.0.1]) by fermat.math.technion.ac.il (8.12.10/8.12.10) with ESMTP id h9H5olxE002158; Fri, 17 Oct 2003 07:50:47 +0200 (IST) Received: (from rl@localhost) by fermat.math.technion.ac.il (8.12.10/8.12.10/Submit) id h9H5oknY002157; Fri, 17 Oct 2003 07:50:46 +0200 (IST) X-Authentication-Warning: fermat.math.technion.ac.il: rl set sender to rl@math.technion.ac.il using -f Date: Fri, 17 Oct 2003 07:50:46 +0200 From: "Zvi Har'El" To: Lloyd Zusman Cc: zsh-users@sunsite.dk Subject: Re: Incomplete completion for w3m under 4.1.1 Message-ID: <20031017055046.GA1976@fermat.math.technion.ac.il> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i Hebrew-Date: 21 Tishri 5764 X-PGP-Public-Key: http://www.math.technion.ac.il/~rl/pubkey.html 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" and next "w3m file://" 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