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

PATCH: _xloadimage



Without an rc file for xli/xloadimage, no file extensions are found so
file completion wasn't working. This patch makes it use a default set of
extensions.

Index: _xloadimage
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/X/Command/_xloadimage,v
retrieving revision 1.2
diff -u -r1.2 _xloadimage
--- _xloadimage	16 Jan 2002 16:29:52 -0000	1.2
+++ _xloadimage	17 Oct 2002 08:38:20 -0000
@@ -33,8 +33,13 @@
     '*-global[following option applies to all images]'
   )
 fi
-ipath=( . ${=rc[1]#*:} )
-extension=( ${=rc[2]#*:} )
+ipath=( . ${=${(M)rc:#*path:*}#*:} )
+extension=( ${=${(M)rc:#*extensions:*}#*:} )
+# set default file extensions if there are none
+(( $#extension )) || extension=(
+  .gif .jpg .jpeg .png .rle .csun .msun .sun .face
+  .xbm .bm .fbm .pcx .ppm .pgm .pbm .tga .xpm
+)
 
 # all options are valid after -help so no exclusion lists below
 _x_arguments "$args[@]" \

This e-mail and any attachment is for authorised use by the intended recipient(s) only.  It may contain proprietary material, confidential information and/or be subject to legal privilege.  It should not be copied, disclosed to, retained or used by, any other party.  If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender.  Thank you.



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