Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: search XDG_DATA_DIRS in _setxkbmap completion
Hello
> How should empty array elements in XDG_DATA_DIRS be handled? E.g.,
> XDG_DATA_DIRS=/foo:/bar::/baz ?
how about s.th. around the lines of:
tosh ~ %
XDG_DATA_DIRS=/usr/lib/X11/xkb:/usr/share/X11/xkb:/usr/local/lib/X11/xkb:/usr/local/share/X11/xkb
tosh ~ % typeset -aU searchdirs
tosh ~ % searchdirs=(${(s.:.)XDG_DATA_DIRS}
{/usr/lib,/usr/share,/usr/local/lib,/usr/local/share}/X11/xkb ${XDG_DATA_HOME}
~/.local/share/X11/xkb)
tosh ~ % ev searchdirs
array-unique searchdirs:
1='/usr/lib/X11/xkb'
2='/usr/share/X11/xkb'
3='/usr/local/lib/X11/xkb'
4='/usr/local/share/X11/xkb'
5='/home/heinb/.local/share/X11/xkb'
tosh ~ % searchdirs+=('') << just for example
tosh ~ % ev searchdirs
array-unique searchdirs:
1='/usr/lib/X11/xkb'
2='/usr/share/X11/xkb'
3='/usr/local/lib/X11/xkb'
4='/usr/local/share/X11/xkb'
5='/home/heinb/.local/share/X11/xkb'
6='' <<------ empty
tosh ~ % searchdirs=(${^~searchdirs}(N/))
tosh ~ % ev searchdirs
array-unique searchdirs:
1='/usr/share/X11/xkb'
kind regards,
Thilo
Messages sorted by:
Reverse Date,
Date,
Thread,
Author