about summary refs log tree commit diff
path: root/Completion/X/Command
diff options
context:
space:
mode:
authorOliver Kiddle <opk@users.sourceforge.net>2002-10-17 09:06:40 +0000
committerOliver Kiddle <opk@users.sourceforge.net>2002-10-17 09:06:40 +0000
commit1eb8f971a49b2f0852725aa5f769119b07a177d5 (patch)
tree82ac14c636a61f5146f0ab13ced85b9378662856 /Completion/X/Command
parent6c998a07abd19822efd77d6fd6d919464d68ba44 (diff)
downloadzsh-1eb8f971a49b2f0852725aa5f769119b07a177d5.tar.gz
zsh-1eb8f971a49b2f0852725aa5f769119b07a177d5.tar.xz
zsh-1eb8f971a49b2f0852725aa5f769119b07a177d5.zip
17832: add a default list of filename extensions as a fallback
Diffstat (limited to 'Completion/X/Command')
-rw-r--r--Completion/X/Command/_xloadimage9
1 files changed, 7 insertions, 2 deletions
diff --git a/Completion/X/Command/_xloadimage b/Completion/X/Command/_xloadimage
index 132ecbeca..5763385e8 100644
--- a/Completion/X/Command/_xloadimage
+++ b/Completion/X/Command/_xloadimage
@@ -33,8 +33,13 @@ else
     '*-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[@]" \