zsh-workers
 help / color / mirror / code / Atom feed
From: Oliver Freyermuth <o.freyermuth@googlemail.com>
To: zsh-workers@zsh.org
Subject: zathura conpletion for zsh broken
Date: Tue, 25 Sep 2018 17:14:04 +0200	[thread overview]
Message-ID: <057ea9a2-d934-59e6-3109-e5093f0f9878@googlemail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 502 bytes --]

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

[-- Attachment #2: 0001-Fix-zathura-completion-supported_filetypes.patch --]
[-- Type: text/x-patch, Size: 816 bytes --]

From 5959af248d0574f27612485f43b8064247cb7b6e Mon Sep 17 00:00:00 2001
From: Oliver Freyermuth <o.freyermuth@googlemail.com>
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


             reply	other threads:[~2018-09-25 15:14 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-25 15:14 Oliver Freyermuth [this message]
2018-09-25 19:21 ` Daniel Shahaf
2018-09-25 20:02   ` Oliver Freyermuth
2018-09-25 20:36     ` Daniel Shahaf
2018-09-25 21:22       ` Oliver Freyermuth
2018-09-25 22:56         ` Daniel Shahaf
2018-09-26  2:22           ` Oliver Freyermuth
2018-09-26 21:08     ` Leah Neukirchen
2018-09-27 18:20       ` Daniel Shahaf
2018-09-27 18:31         ` Bart Schaefer
2018-09-27 19:16           ` Daniel Shahaf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=057ea9a2-d934-59e6-3109-e5093f0f9878@googlemail.com \
    --to=o.freyermuth@googlemail.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).