1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-11-01 18:30:55 +01:00

17832: add a default list of filename extensions as a fallback

This commit is contained in:
Oliver Kiddle 2002-10-17 09:06:40 +00:00
parent 6c998a07ab
commit 1eb8f971a4
2 changed files with 12 additions and 2 deletions

View file

@ -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

View file

@ -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[@]" \