From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14725 invoked from network); 11 Dec 2001 17:18:05 -0000 Received: from ns2.primenet.com.au (HELO primenet.com.au) (?TRHLLofsTyygkgvVRIVUb4OHXbbuiPv4?@203.24.36.3) by ns1.primenet.com.au with SMTP; 11 Dec 2001 17:18:05 -0000 Received: (qmail 3145 invoked from network); 11 Dec 2001 17:18:04 -0000 Received: from sunsite.dk (130.225.247.90) by proxy.melb.primenet.com.au with SMTP; 11 Dec 2001 17:18:04 -0000 Received: (qmail 22877 invoked by alias); 11 Dec 2001 17:17:57 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 16323 Received: (qmail 22866 invoked from network); 11 Dec 2001 17:17:56 -0000 X-VirusChecked: Checked X-Authentication-Warning: iris.logica.co.uk: Host kiddleo@rambo.logica.co.uk [158.234.33.58] claimed to be yahoo.co.uk Sender: kiddleo@iris.logica.co.uk Message-ID: <3C163FA6.BC9C1A66@yahoo.co.uk> Date: Tue, 11 Dec 2001 17:17:26 +0000 From: Oliver Kiddle X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.2.15 i686) X-Accept-Language: en MIME-Version: 1.0 To: zsh-workers@sunsite.dk Subject: _urls -f Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit I don't like the behaviour of _urls -f in that it completes files before urls without letting you define a style to complete both together or urls first. The patch below is what I would suggest here. Note that _urls is not called with -f from anywhere other than _webbrowser and anything which did could always call _webbrowser directly instead anyway (_netscape may have to). Any user preferring the current behaviour could get it back with a style. e.g: zstyle ':completion::complete:galeon:*' tag-order files urls Any views? Oliver Index: Completion/Unix/Command/_webbrowser =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_webbrowser,v retrieving revision 1.2 diff -u -r1.2 _webbrowser --- Completion/Unix/Command/_webbrowser 2001/10/08 16:22:40 1.2 +++ Completion/Unix/Command/_webbrowser 2001/12/11 17:14:51 @@ -1,3 +1,3 @@ -#compdef amaya arena chimera express grail gzilla hotjava mmm mozilla opera www xmosaic Mosaic galeon +#compdef amaya arena chimera express grail gzilla hotjava mmm mozilla opera www xmosaic Mosaic galeon konqueror -_urls -f +_alternative 'files:file:_files' 'urls:url:_urls' Index: Completion/Unix/Type/_urls =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Unix/Type/_urls,v retrieving revision 1.2 diff -u -r1.2 _urls --- Completion/Unix/Type/_urls 2001/10/08 16:22:40 1.2 +++ Completion/Unix/Type/_urls 2001/12/11 17:14:51 @@ -1,9 +1,5 @@ #compdef curl -# Usage: _urls [-f] -# Options: -# -f : complete files first. -# # Configuration styles used: # # urls @@ -48,11 +44,6 @@ local localhttp_documentroot="$localhttp[2]" local localhttp_userdir="$localhttp[3]" -if [[ "$1" = -f ]]; then - shift - _wanted -C -f files expl file _files "$@" && return 0 -fi - zstyle -a ":completion:${curcontext}:urls" urls urls if [[ $#urls -gt 1 || ( $#urls -eq 1 && ! -d $urls[1] ) ]]; then @@ -134,7 +125,7 @@ _tags hosts while _tags; do - while _next_label hosts expl host "$@"; do + while _next_label hosts expl host; do compset -S '[:/]*' || suf="/" (( $#uhosts )) || _hosts -S "$suf" -r '/:' "$expl[@]" && ret=0 [[ "$scheme" = http ]] && uhosts=($uhosts $localhttp_servername) _____________________________________________________________________ This message has been checked for all known viruses by the MessageLabs Virus Scanning Service. For further information visit http://www.messagelabs.com/stats.asp