Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

zathura conpletion for zsh broken



Hi,

the zathura completion which was recently added breaks for me. I have:
-----------------------------
$ ls -1 /usr/lib/zathura/*
/usr/lib/zathura/cb.so
/usr/lib/zathura/djvu.so
/usr/lib/zathura/pdf.so
/usr/lib/zathura/ps.so
-----------------------------
The completion code fails to strip the plugin_path correctly in case the plugin is neither called poppler nor mupdf. 
The attached patch fixes the situation for me. 

I am not subscribed to list, please include me in replies. 

Cheers,
	Oliver
From 5959af248d0574f27612485f43b8064247cb7b6e Mon Sep 17 00:00:00 2001
From: Oliver Freyermuth <o.freyermuth@xxxxxxxxxxxxxx>
Date: Tue, 25 Sep 2018 17:08:14 +0200
Subject: [PATCH] Fix zathura completion supported_filetypes.

---
 Completion/X/Command/_zathura | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Completion/X/Command/_zathura b/Completion/X/Command/_zathura
index 141cadf63..cc07828b3 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%.so}#${plugins_dir}/}"
     fi
   done
   _files -g "*.(${(j.|.)supported_filetypes})(-.)"
-- 
2.16.4



Messages sorted by: Reverse Date, Date, Thread, Author