Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zathura conpletion for zsh broken
- X-seq: zsh-workers 43571
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: Leah Neukirchen <leah@xxxxxxxx>, zsh-workers@xxxxxxx
- Subject: Re: zathura conpletion for zsh broken
- Date: Thu, 27 Sep 2018 18:20:49 +0000
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= daniel.shahaf.name; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=+PrrlR PZj753Zjf1K2lW9+wP6lSpK+3EOusMdCkuT+8=; b=dRPwgj59rSTuKOmqENbCmz iXFD6xktg1cexxOY9YkqxDMrM2lT4JaPWvfTsKt10GpTIDbkSmNAsCFOhNfXQptO Ul0Uib3HvJJOkO5fetwUF8dgQX0h7JxVeNQARXc+M3JxELCC/NsiM+sB1lHAN7VL 6K4jHdS5a2vWkGKDSfA0CZEtnsNNyBzenk9OmzG6tHgEpqwppdjIA1RbiFbr0QBR EruKFQ4GQ9yxcruQHeiTak9XysUUJXzHqv6Izl5AjhgaKK2pm+B/Eje5k37j9ocK mo1VvlB12yrd5KisDaqqtdgoZbsquOU6eYFkBevAOhP+fkRHeW7+aPtqk3g8h+cQ ==
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=+PrrlR PZj753Zjf1K2lW9+wP6lSpK+3EOusMdCkuT+8=; b=si6dwqkE67gaBpLLMp9j81 +eZI/MZBxpoEO7E0AI0TL2Ovuj7yAWCiHB0jxFmDvRpSonBInyV760sSQL/dArsX Ys3KfkpD8tiOh0o7Z6Z4pgup2mH2ia6C1che3D+NwRKpT2cgZU29F7vSctuaWRY9 1ebjyTD7/uFCKFDeflx0yVOoUtjv9Pi07a/IWV+rOmTLYZjqt/tHIf6OSu3faPSv e6JUV5PlOLi0X+jzBSDddlk8DgbpE9TFIX2n6po5tLNy/OEOE7xIZCa9zoG/t7R5 +WApnDzDPSXIMkU0CB4P1q789AKEgFt7Fvcg1xzj1aOmJi2lv4W0soOU00apFXOA ==
- In-reply-to: <87r2hg9db6.fsf@vuxu.org>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <057ea9a2-d934-59e6-3109-e5093f0f9878@googlemail.com> <20180925192153.uwitfgrd2yydxtah@tarpaulin.shahaf.local2> <75619dc0-7b02-45bd-7cd9-a5078d6829a5@googlemail.com> <87r2hg9db6.fsf@vuxu.org>
Leah Neukirchen wrote on Wed, 26 Sep 2018 23:08 +0200:
> Oliver Freyermuth <o.freyermuth@xxxxxxxxxxxxxx> writes:
>
> > Am 25.09.18 um 21:21 schrieb Daniel Shahaf:
> >> Oliver Freyermuth wrote on Tue, Sep 25, 2018 at 17:14:04 +0200:
> >>> +++ 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}/}"
> >>
> >> Isn't this equivalent to «supported_filetypes+=${pf:t:r}»?
> >
> > Indeed, it is, and that would be much easier.
>
> Hm, on my system (Void Linux with zathura-pdf-mupdf 0.3.3 and meson
> build) the files are called
>
> /usr/lib/zathura/libdjvu.so
> /usr/lib/zathura/libpdf-mupdf.so
> /usr/lib/zathura/libps.so
>
I'm on Debian and I have /usr/lib/zathura/{djvu,pdf,ps}.so.
> So the lib-stripping seems to make sense?
Patch attached.
Thanks,
Daniel
From 094fef6e8fa9895c59ddd58e2a1f4492cefdf463 Mon Sep 17 00:00:00 2001
From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
Date: Thu, 27 Sep 2018 18:20:19 +0000
Subject: [PATCH] Teach _zathura to support both naming conventions of
/usr/lib/zathura/*.so modules.
---
Completion/X/Command/_zathura | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Completion/X/Command/_zathura b/Completion/X/Command/_zathura
index 615488068..9c26910d8 100644
--- a/Completion/X/Command/_zathura
+++ b/Completion/X/Command/_zathura
@@ -24,7 +24,9 @@ _zathura_files(){
elif [[ $pf =~ "poppler" ]]; then
supported_filetypes+="pdf"
else
+ # Some systems have /usr/lib/zathura/djvu.so, others have /usr/lib/zathura/libdjvu.so.
supported_filetypes+="${pf:t:r}"
+ supported_filetypes+="${${pf:t:r}#lib}"
fi
done
_files -g "*.(${(j.|.)${(@u)supported_filetypes}})(-.)"
Messages sorted by:
Reverse Date,
Date,
Thread,
Author