diff options
author | Oliver Kiddle <opk@users.sourceforge.net> | 2002-10-18 09:26:55 +0000 |
---|---|---|
committer | Oliver Kiddle <opk@users.sourceforge.net> | 2002-10-18 09:26:55 +0000 |
commit | a167b473e8775c4ccccb5dfe75d2682ab13a21fb (patch) | |
tree | 68dbfe370957e83b8085280e08f5f664171839ee | |
parent | 35b617afb498d692729ae0689f96991c4672d822 (diff) | |
download | zsh-a167b473e8775c4ccccb5dfe75d2682ab13a21fb.tar.gz zsh-a167b473e8775c4ccccb5dfe75d2682ab13a21fb.tar.xz zsh-a167b473e8775c4ccccb5dfe75d2682ab13a21fb.zip |
17832: add a default list of filename extensions as a fallback
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | Completion/X/Command/_xloadimage | 9 |
2 files changed, 12 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog index 608c7a3d7..7b7e400a4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2002-10-17 Oliver Kiddle <opk@zsh.org> + + * 17832: Completion/X/Command/_xloadimage: add default list of + filename extensions as a fallback + 2002-10-10 Clint Adams <clint@zsh.org> * 17810 (Martin Waitz): Src/utils.c: bung up memory leak with 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[@]" \ |