From: Oliver Kiddle <okiddle@yahoo.co.uk>
To: zsh-workers@sunsite.dk
Subject: _urls -f
Date: Tue, 11 Dec 2001 17:17:26 +0000 [thread overview]
Message-ID: <3C163FA6.BC9C1A66@yahoo.co.uk> (raw)
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
next reply other threads:[~2001-12-11 17:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-12-11 17:17 Oliver Kiddle [this message]
2001-12-11 17:28 ` Clint Adams
2001-12-12 4:34 ` Tanaka Akira
2001-12-12 11:24 ` Oliver Kiddle
2002-01-07 14:37 ` Sven Wischnowsky
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=3C163FA6.BC9C1A66@yahoo.co.uk \
--to=okiddle@yahoo.co.uk \
--cc=zsh-workers@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).