Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: _firefox



Not sure why we don't have this already, except that the command line
options aren't very well documented.

Index: Completion/Unix/Command/.distfiles
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/.distfiles,v
retrieving revision 1.80
diff -u -r1.80 .distfiles
--- Completion/Unix/Command/.distfiles	25 Oct 2006 13:13:23 -0000	1.80
+++ Completion/Unix/Command/.distfiles	8 Dec 2006 21:15:27 -0000
@@ -10,6 +10,7 @@
 _dict           _diff           _diffstat       _du             _dvi
 _ecasound       _elinks         _elm            _enscript       _env
 _fakeroot       _fetchmail      _figlet         _find           _finger
+_firefox
 _flasher        _flex           _fortune        _fsh            _fuser
 _gcc            _gdb            _getconf        _getent         _git
 _getmail
Index: Completion/Unix/Command/_firefox
===================================================================
RCS file: Completion/Unix/Command/_firefox
diff -N Completion/Unix/Command/_firefox
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ Completion/Unix/Command/_firefox	8 Dec 2006 21:15:27 -0000
@@ -0,0 +1,46 @@
+#compdef firefox
+
+local context state line expl
+local -A opt_args
+
+_arguments \
+    '--display[pick X display]:display:_x_display' \
+    '--sync[make X calls synchronous]' \
+    '--no-xshm[no X shared memory extension]' \
+    '--xim-preedit=:style: ' \
+    '--xim-status=:style: ' \
+    '--g-fatal-warnings[make all warnings fatal]' \
+    '-browser[open browser window]' \
+    '-chrome[specify chrome]:load specified chrome:_urls' \
+    '-console[start with debugging console]' \
+    '-contentLocale=[select local for content]:locale:_locales' \
+    '-CreateProfile[create a profile]:profile name: ' \
+    '-h[output help message]' \
+    '-height[set initial window height]:height: ' \
+    '-help[output help message]' \
+    '-inspector[start with DOM Inspector]:URL to inspect:->location' \
+    '-install-global-extension[install an extension]:extension to install:_files' \
+    '-jsconsole[start with Javascript console]' \
+    '-new-window[load URL in new window]:URL to load:->location' \
+    '-new-tab[load URL in new tab]:URL to load:->location' \
+    '-no-remote[run with multiple profiles]' \
+    '-P[start with given profile]:profile:->profile' \
+    '-profile[specify profile file]:profile file:_files' \
+    '-ProfileManager[start with profile manager]' \
+    '-UILocale[select local for UI]:locale:_locales' \
+    '-v[show version]' \
+    '-version[show version]' \
+    '-width[set initial window width]:width: ' \
+    '*:location:->location' && return
+
+case $state in
+    (location)
+    _alternative 'files:file:_files' 'urls:URL:_urls'
+    ;;
+
+    (profile)
+    _wanted profiles expl profile compadd --
+    $(sed -n -e 's/^\[General\]//' -e 's/^\[\(.*\)\]$/\1/p' \
+	~/.mozilla/firefox/profiles.ini)
+    ;;
+esac
Index: Completion/Unix/Command/_webbrowser
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_webbrowser,v
retrieving revision 1.7
diff -u -r1.7 _webbrowser
--- Completion/Unix/Command/_webbrowser	21 May 2005 06:55:35 -0000	1.7
+++ Completion/Unix/Command/_webbrowser	8 Dec 2006 21:15:27 -0000
@@ -1,3 +1,3 @@
-#compdef amaya arena chimera dillo express firefox galeon grail gzilla hotjava konqueror light mmm Mosaic netrik opera phoenix retawq skipstone www xmosaic zen
+#compdef amaya arena chimera dillo express galeon grail gzilla hotjava konqueror light mmm Mosaic netrik opera phoenix retawq skipstone www xmosaic zen
 
 _alternative 'files:file:_files' 'urls:URL:_urls'

-- 
Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/



Messages sorted by: Reverse Date, Date, Thread, Author