From 624219e0e4cbfdfb286e707bd2853f2d7b6a4a7d Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Wed, 19 Sep 2018 22:36:17 +0200 Subject: 43502: Search XDG_DATA_DIRS in _setxkbmap completion --- Completion/X/Command/_setxkbmap | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'Completion/X') 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 -- cgit v1.2.3 From e4ca9d8ae3275f07f33a139298f270cba97fd7f9 Mon Sep 17 00:00:00 2001 From: Oliver Freyermuth Date: Tue, 25 Sep 2018 20:32:56 +0000 Subject: 43544: Fix zathura filename completion derived from *.so plugin name. --- ChangeLog | 5 +++++ Completion/X/Command/_zathura | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'Completion/X') diff --git a/ChangeLog b/ChangeLog index b5c41edb5..36de34da3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2018-09-25 Oliver Freyermuth + + * 43544: Completion/X/Command/_zathura: Fix zathura filename + completion derived from *.so plugin name. + 2018-09-25 Daniel Shahaf * 43489: Src/exec.c: Add error checking on a new write() call. diff --git a/Completion/X/Command/_zathura b/Completion/X/Command/_zathura index 141cadf63..64888d013 100644 --- a/Completion/X/Command/_zathura +++ b/Completion/X/Command/_zathura @@ -25,7 +25,7 @@ _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})(-.)" -- cgit v1.2.3 From cbcf6d18648fad927fc0b193afb94e59f0bb6c21 Mon Sep 17 00:00:00 2001 From: Oliver Freyermuth Date: Tue, 25 Sep 2018 23:08:33 +0200 Subject: 43554 (tweaked): Fix zathura completion ignoring multiple plugin directories. --- ChangeLog | 5 +++++ Completion/X/Command/_zathura | 5 ++--- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'Completion/X') diff --git a/ChangeLog b/ChangeLog index 36de34da3..2f37a0359 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2018-09-25 Oliver Freyermuth + + * 43554 (tweaked): Completion/X/Command/_zathura: Fix zathura + completion ignoring multiple plugin directories. + 2018-09-25 Oliver Freyermuth * 43544: Completion/X/Command/_zathura: Fix zathura filename diff --git a/Completion/X/Command/_zathura b/Completion/X/Command/_zathura index 64888d013..615488068 100644 --- a/Completion/X/Command/_zathura +++ b/Completion/X/Command/_zathura @@ -8,8 +8,7 @@ _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(-.)" @@ -28,7 +27,7 @@ _zathura_files(){ supported_filetypes+="${pf:t:r}" fi done - _files -g "*.(${(j.|.)supported_filetypes})(-.)" + _files -g "*.(${(j.|.)${(@u)supported_filetypes}})(-.)" } _arguments -s -S \ -- cgit v1.2.3 From ef584910922b1c46781d397165c17473e94dbbe0 Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Wed, 17 Oct 2018 17:57:58 +0200 Subject: 43697: match uppercase filename extensions in zathura completion --- ChangeLog | 3 +++ Completion/X/Command/_zathura | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'Completion/X') diff --git a/ChangeLog b/ChangeLog index 9a9e1cdd1..7bf8b3485 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2018-10-17 Oliver Kiddle + * 43697: Completion/X/Command/_zathura: match uppercase + filename extensions + * 43698: Completion/Unix/Command/_git: update options for 2.19 2018-10-16 Daniel Shahaf diff --git a/Completion/X/Command/_zathura b/Completion/X/Command/_zathura index 615488068..ebd229909 100644 --- a/Completion/X/Command/_zathura +++ b/Completion/X/Command/_zathura @@ -11,7 +11,7 @@ _zathura_files(){ 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 @@ -27,7 +27,7 @@ _zathura_files(){ supported_filetypes+="${pf:t:r}" fi done - _files -g "*.(${(j.|.)${(@u)supported_filetypes}})(-.)" + _files -g "(#i)*.(${(j.|.)${(@u)supported_filetypes}})(-.)" } _arguments -s -S \ -- cgit v1.2.3