* PATCH: _mozilla
@ 2001-12-11 20:06 Clint Adams
2001-12-12 11:09 ` Oliver Kiddle
0 siblings, 1 reply; 3+ messages in thread
From: Clint Adams @ 2001-12-11 20:06 UTC (permalink / raw)
To: zsh-workers
This conflicts with part of 16323.
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 20:03:28
@@ -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 opera www xmosaic Mosaic galeon konqueror skipstone light dillo
_urls -f
Index: Completion/X/Command/.distfiles
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/X/Command/.distfiles,v
retrieving revision 1.2
diff -u -r1.2 .distfiles
--- Completion/X/Command/.distfiles 2001/04/26 14:00:45 1.2
+++ Completion/X/Command/.distfiles 2001/12/11 20:03:28
@@ -2,4 +2,5 @@
.distfiles
_gv _netscape _xauth _xfig _xrdb _xterm _xwit
_nedit _vnc _x_utils _xdvi _xmodmap _xset _xv
+_mozilla
'
Index: Completion/X/Command/_mozilla
===================================================================
RCS file: _mozilla
diff -N _mozilla
--- /dev/null Thu May 24 22:33:05 2001
+++ _mozilla Tue Dec 11 12:03:28 2001
@@ -0,0 +1,99 @@
+#compdef mozilla
+
+local curcontext="$curcontext" state line ret=1 suf
+typeset -A opt_args
+
+_x_arguments -C \
+ '-height[height of startup window]:height:' \
+ '(-h)-help[show usage message]' \
+ '(-help)-h[show usage message]' \
+ '-installer[start with 4.x migration window]' \
+ '-width[width of startup window]:width:' \
+ '(-v)-version[show the version number and build date]' \
+ '(-version)-v[show the version number and build date]' \
+ '-CreateProfile:profile:' \
+ '-P[start with profile]:profile:' \
+ '-ProfileWizard[start with profile wizard]' \
+ '-ProfileManager[start with profile manager]' \
+ '-SelectProfile[start with profile selection dialog]' \
+ '-UILocale:locale:' \
+ '-contentLocale:locale:' \
+ '-remote[execute a command in an existing Mozilla]:remote command:->remote' \
+ '-splash[enable splash screen]' \
+ '-chat[start with IRC client]' \
+ '-news[start with news]' \
+ '-jsconsole[start with JavaScript Console]' \
+ '-venkman[start with JavaScript debugger]' \
+ '-terminal[start with command line terminal]' \
+ '-edit[start with editor]:url:_urls' \
+ '-chrome[load the specified chrome]:url:_urls' \
+ '-mail[start with mail]' \
+ '-compose[start with messenger compose]:url:_urls' \
+ '*:location:->urls' && ret=0
+
+[[ "$state" = "urls" ]] &&
+ _files "$@" && return 0
+
+# Handle mozilla remote commands
+if [[ "$state" = "remote" ]]; then
+ local -a remote_commands
+ remote_commands=(openURL openFile saveAs mailto addBookmark)
+
+ compset -P '*\('
+ if compset -S '(|\\)\)*'; then
+ set - -S "" "$@"
+ else
+ set - -S"${${QIPREFIX:+)}:-\)}$compstate[quote] " "$@"
+ fi
+ case $IPREFIX in
+ openURL*|addBookmark*) state=urls;;
+ openFile*) _files "$@" -W ~;;
+ saveAs*)
+ if compset -P "*,"; then
+ _wanted types expl 'data type' \
+ compadd "$@" -M 'm:{a-zA-Z}={A-Za-z}' HTML Text PostScript && ret=0
+ else
+ compset -S ",*" || suf=","
+ _files -qS "$suf" -W ~ && ret=0
+ fi
+ ;;
+ mailto*)
+ compset -P "*,"
+ if compset -P '*@'; then
+ _wanted hosts expl 'remote host name' _hosts -q -S, && ret=0
+ else
+ compset -S "@*" || suf="@"
+ _wanted users expl 'login name' _users -q -S "$suf" && ret=0
+ fi
+ ;;
+ *)
+ compset -S '(|\\)\(*' || suf="${${QIPREFIX:+(}:-\(}"
+ _wanted commands expl 'remote commands' \
+ compadd -qS "$suf" -M 'm:{a-zA-Z}={A-Za-z}' -a \
+ remote_commands && ret=0
+ ;;
+ esac
+fi
+
+if [[ "$state" = "urls" ]]; then
+ # Complete mozilla urls
+ if compset -P about: ; then
+ _wanted values expl 'about what' \
+ compadd "$@" authors blank cache document fonts global hype image-cache \
+ license logo memory-cache mozilla plugins && ret=0
+ elif compset -P news: ; then
+ _newsgroups "$@" && ret=0
+ else
+ _tags prefixes
+ while _tags; do
+ while _next_label prefixes expl 'URL prefix' "$@"; do
+ _urls "$expl[@]" && ret=0
+ compset -S '[^:]*'
+ compadd -S '' "$expl[@]" about: news: mocha: javascript: && ret=0
+ done
+ (( ret )) || return 0
+ done
+ fi
+fi
+
+return ret
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: PATCH: _mozilla
2001-12-11 20:06 PATCH: _mozilla Clint Adams
@ 2001-12-12 11:09 ` Oliver Kiddle
2001-12-12 17:47 ` Clint Adams
0 siblings, 1 reply; 3+ messages in thread
From: Oliver Kiddle @ 2001-12-12 11:09 UTC (permalink / raw)
To: Clint Adams; +Cc: zsh-workers
Isn't most of this the same as _netscape. And if _netscape was updated
for netscape 6.2 would there be any difference at all between them?
What I'd suggest is that we don't have a separate _mozilla but merge
these changes into _netscape. Should we still be supporting netscape 4
in _netscape at all? If so we can probably just look for the
user-preference directory (.netscape or .netscape6) to decide quickly
which set of options to complete.
Does mozilla still accept all the GTK options? We probably need an
_gtk_arguments function really.
Oliver
_____________________________________________________________________
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: PATCH: _mozilla
2001-12-12 11:09 ` Oliver Kiddle
@ 2001-12-12 17:47 ` Clint Adams
0 siblings, 0 replies; 3+ messages in thread
From: Clint Adams @ 2001-12-12 17:47 UTC (permalink / raw)
To: Oliver Kiddle; +Cc: zsh-workers
> Isn't most of this the same as _netscape. And if _netscape was updated
> for netscape 6.2 would there be any difference at all between them?
I don't know; I tried Netscape 6 for Solaris, and it was very unstable.
I have not used Netscape since.
> What I'd suggest is that we don't have a separate _mozilla but merge
> these changes into _netscape. Should we still be supporting netscape 4
> in _netscape at all? If so we can probably just look for the
> user-preference directory (.netscape or .netscape6) to decide quickly
> which set of options to complete.
I'd wager that the majority of Netscape users are still on 4.
> Does mozilla still accept all the GTK options? We probably need an
> _gtk_arguments function really.
Yes, it does. I didn't add it because I had no idea what it was all
about.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2001-12-12 17:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-12-11 20:06 PATCH: _mozilla Clint Adams
2001-12-12 11:09 ` Oliver Kiddle
2001-12-12 17:47 ` Clint Adams
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).