From a167b473e8775c4ccccb5dfe75d2682ab13a21fb Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Fri, 18 Oct 2002 09:26:55 +0000 Subject: 17832: add a default list of filename extensions as a fallback --- Completion/X/Command/_xloadimage | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'Completion') 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[@]" \ -- cgit 1.4.1