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

PATCH: minor niggles



Here are some minor things I've noticed during the course of the day
that I'm too lazy to send separately.

- File arguments for _imagemagick commands (display etc.) weren't
  completed properly.  Either I'm missing something major, or
  this didn't get tried after the last tweak.
- zshtcpsys and zshcontrib pages aren't listed in zsh.1.
- pick-web-browser ought to be updated to know about firefox (I've
  made the use-existing-browser feature create a new tab rather
  than a new window because I personally feel that anyone who uses
  multiple windows is weird, but I'm sure there are those who
  think exactly the opposite).
- "zsh-mime-setup -l" didn't notice the handler and flags styles that
  zsh-mime-handler would use, so wasn't accurate in that case.

Index: Completion/Unix/Command/_imagemagick
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_imagemagick,v
retrieving revision 1.8
diff -u -r1.8 _imagemagick
--- Completion/Unix/Command/_imagemagick	8 Jun 2005 12:45:34 -0000	1.8
+++ Completion/Unix/Command/_imagemagick	19 Feb 2006 21:04:26 -0000
@@ -14,7 +14,7 @@
 formats=jpg:jpeg:tiff:miff:ras:bmp:cgm:dcx:ps:eps:fig:fits:fpx:gif:mpeg:pbm:pgm:ppm:pcd:pcl:pdf:pcx:png:rad:rgb:rgba:rle:sgi:html:shtml:tga:ttf:uil:xwd:xbm:xpm:yuv
 
 if (( $# )); then
-  _files "$@" "$expl[@]" -g '*.(#i)(${~format//:/|})(-.)'
+  _files "$@" -g "*.(#i)(${~formats//:/|})(-.)"
   return
 fi
 
Index: Doc/Zsh/intro.yo
===================================================================
RCS file: /cvsroot/zsh/zsh/Doc/Zsh/intro.yo,v
retrieving revision 1.5
diff -u -r1.5 intro.yo
--- Doc/Zsh/intro.yo	21 Oct 2005 09:51:55 -0000	1.5
+++ Doc/Zsh/intro.yo	19 Feb 2006 21:04:27 -0000
@@ -26,7 +26,9 @@
 list(em(zshcompsys)   Zsh completion system)
 list(em(zshcompctl)   Zsh completion control)
 list(em(zshmodules)   Zsh loadable modules)
+list(em(zshtcpsys)    Zsh built-in TCP functions)
 list(em(zshzftpsys)   Zsh built-in FTP client)
+list(em(zshcontrib)   Additional zsh functions and utilities)
 ifzshone(\
 list(em(zshall)       Meta-man page containing all of the above)
 )\
Index: Functions/MIME/pick-web-browser
===================================================================
RCS file: /cvsroot/zsh/zsh/Functions/MIME/pick-web-browser,v
retrieving revision 1.2
diff -u -r1.2 pick-web-browser
--- Functions/MIME/pick-web-browser	26 Jul 2004 16:59:55 -0000	1.2
+++ Functions/MIME/pick-web-browser	19 Feb 2006 21:04:27 -0000
@@ -28,7 +28,7 @@
 # a remote URL.  You can change the order of preference.
 # If none is already running, starts the first in the array.
 zstyle -a :mime: x-browsers xbrowsers ||
-  xbrowsers=(mozilla netscape opera konqueror)
+  xbrowsers=(firefox mozilla netscape opera konqueror)
 # Preferred command line browser.  Used if there is on $DISPLAY set.
 zstyle -a :mime: tty-browsers ttybrowsers ||
   ttybrowsers=(links lynx)
@@ -89,6 +89,9 @@
 	# MIME handling, not just web pages.
 	kfmclient openURL $url ||
 	  dcop $(dcop|grep konqueror) default openBrowserWindow $url
+      elif [[ $browser = firefox ]]; then
+	  # open in new tab: should make this customizable
+	  $browser -new-tab $url
       else
 	# Mozilla bells and whistles are described at:
 	# http://www.mozilla.org/unix/remote.html
Index: Functions/MIME/zsh-mime-setup
===================================================================
RCS file: /cvsroot/zsh/zsh/Functions/MIME/zsh-mime-setup,v
retrieving revision 1.4
diff -u -r1.4 zsh-mime-setup
--- Functions/MIME/zsh-mime-setup	25 Oct 2005 22:50:47 -0000	1.4
+++ Functions/MIME/zsh-mime-setup	19 Feb 2006 21:04:27 -0000
@@ -32,11 +32,19 @@
 
 
 if [[ -n $o_list ]]; then
-  # List and return.
+  # List and return.  Remember that suffixes may be overridden by styles.
+  # However, we require some sort of standard handler to be present,
+  # so we don't need to search styles for suffixes that aren't
+  # handled.  Yet.
+  local list_word
   for suffix in ${(ko)zsh_mime_handlers}; do
-      print ${(r.10.)suffix}${zsh_mime_handlers[$suffix]}
-      if [[ -n ${zsh_mime_flags[$suffix]} ]]; then
-	print "  flags: ${zsh_mime_flags[$suffix]}"
+      zstyle -s ":mime:.$suffix:" handler list_word ||
+        list_word=${zsh_mime_handlers[$suffix]}
+      print ${(r.10.)suffix}$list_word
+      zstyle -s ":mime:.$suffix:" flags list_word ||
+        list_word=${zsh_mime_flags[$suffix]}
+      if [[ -n $list_word ]]; then
+	print "  flags: $list_word"
       fi
   done
   return 0

-- 
Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
Web page still at http://www.pwstephenson.fsnet.co.uk/



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