summaryrefslogtreecommitdiff
path: root/Completion/X/Command
diff options
context:
space:
mode:
authorAxel Beckert <abe@deuxchevaux.org>2018-12-24 04:40:22 +0100
committerAxel Beckert <abe@deuxchevaux.org>2018-12-24 04:40:22 +0100
commitbf8b7f713a5b04a191f4596fb86bbbfca0a855ce (patch)
treeb647a8dc990c8c845b8a8eca7bf92fbbf17e1fb5 /Completion/X/Command
parent06946d431a4426c6e5dffec1d7edb17c1dbd467c (diff)
parent9dbde9e9c7d22ee0d301e4a2fecf97906d1ddce9 (diff)
downloadzsh-bf8b7f713a5b04a191f4596fb86bbbfca0a855ce.tar.gz
zsh-bf8b7f713a5b04a191f4596fb86bbbfca0a855ce.zip
New upstream release candidate 5.6.2-test-2
Merge branch 'upstream' at 'zsh-5.6.2-test-2' into branch debian
Diffstat (limited to 'Completion/X/Command')
-rw-r--r--Completion/X/Command/_setxkbmap10
-rw-r--r--Completion/X/Command/_zathura9
2 files changed, 10 insertions, 9 deletions
diff --git a/Completion/X/Command/_setxkbmap b/Completion/X/Command/_setxkbmap
index f7310ecdd..486268ed7 100644
--- a/Completion/X/Command/_setxkbmap
+++ b/Completion/X/Command/_setxkbmap
@@ -9,10 +9,12 @@ _setxkbmap() {
setopt extendedglob
# xkb files may be in different places depending on system
- local dir sourcedir
- for dir in /usr/lib/X11/xkb /usr/share/X11/xkb; do
- if [ -d $dir ] ; then
- sourcedir=$dir
+ local dir sourcedir fullname
+ local -a searchdirs=(${XDG_DATA_HOME:-~/.local/share} ${(s.:.)XDG_DATA_DIRS:-/usr/lib:/usr/share:/usr/local/lib:/usr/local/share})
+ for dir in $searchdirs; do
+ fullname="$dir/X11/xkb"
+ if [ -d $fullname ] ; then
+ sourcedir=$fullname
break
fi
done
diff --git a/Completion/X/Command/_zathura b/Completion/X/Command/_zathura
index 141cadf63..ebd229909 100644
--- a/Completion/X/Command/_zathura
+++ b/Completion/X/Command/_zathura
@@ -8,11 +8,10 @@ _zathura_files(){
${(Qv)opt_args[(i)-p|--plugins-dir]}(#qN) \
{/usr/local,/usr,}/lib/zathura(#qN)
do
- plugins_files=( $plugins_dir/*.so )
- (( $#plugins_files )) && break
+ plugins_files+=( $plugins_dir/*.so(N) )
done
if [[ -z "${plugins_files}" ]]; then
- _files -g "*.pdf(-.)"
+ _files -g "(#i)*.pdf(-.)"
return
fi
local -a supported_filetypes
@@ -25,10 +24,10 @@ _zathura_files(){
elif [[ $pf =~ "poppler" ]]; then
supported_filetypes+="pdf"
else
- supported_filetypes+="${${pf%.so}#${plugins_dir}/lib}"
+ supported_filetypes+="${pf:t:r}"
fi
done
- _files -g "*.(${(j.|.)supported_filetypes})(-.)"
+ _files -g "(#i)*.(${(j.|.)${(@u)supported_filetypes}})(-.)"
}
_arguments -s -S \