Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zathura conpletion for zsh broken
- X-seq: zsh-workers 43554
- From: Oliver Freyermuth <o.freyermuth@xxxxxxxxxxxxxx>
- To: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- Subject: Re: zathura conpletion for zsh broken
- Date: Tue, 25 Sep 2018 23:22:22 +0200
- Autocrypt: addr=o.freyermuth@xxxxxxxxxxxxxx; prefer-encrypt=mutual; keydata= xsFNBFLcXs0BEACwmdPc7qrtqygq881dUnf0Jtqmb4Ox1c9IuipBXCB+xcL6frDiXMKFg8Kr RZT05KP6mgjecju2v86UfGxs5q9fuVAubNAP187H/LA6Ekn/gSUbkUsA07ZfegKE1tK+Hu4u XrBu8ANp7sU0ALdg13dpOfeMPADL57D+ty2dBktp1/7HR1SU8yLt//6y6rJdqslyIDgnCz7+ SwI00+BszeYmWnMk5bH6Xb/tNAS2jTPaiSVr5OmJVc5SpcfAPDr2EkHOvkDR3e0gvBEzZhIR fqeTxn4+LfvqkWs24+DmYG6+3SWn62v0xw8fxFjhGbToJkTjNCG2+RhpcFN8bwDDW7xXZONv BGab9BhRTaixkyiLI1HbqcKovXsW0FmI8+yW3vxrGUtZb4XFSr4Ad6uWmRoq2+mbE7QpYoyE JQvXzvMxHq5aThLh6aIE3HLunxM6QbbDLj9xhi7aKlikz5eLV5HRAuVcqhBAvh/bDWpG32CE SfQL0yrqMIVbdkDIB90PRcge7jbmGOxm8YVpsvcsSppUZ9Y8j/rju/HXUoqUJHbtcseQ7crg VDuIucLCS57p2CtZWUvTPcv1XJFiMIdfZVHVd2Ebo6ELNaRWgQt8DeN4KwXLHCrVjt0tINR9 zM/k0W26OMPLSD6+wlFDtAZUng2G8WfmsxvqAh8LtJvzhl2cBwARAQABzS9PbGl2ZXIgRnJl eWVybXV0aCA8by5mcmV5ZXJtdXRoQGdvb2dsZW1haWwuY29tPsLBfAQTAQIAJgIbAwcLCQgH AwIBBhUIAgkKCwQW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XPY+V KB7t2CoZv5xo0STm
- Cc: zsh-workers@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=subject:to:references:cc:from:openpgp:autocrypt:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=I8hw5RSx4+mhOuLOupRR1FNrq4cG+NG2aCfWscEKX8g=; b=trWLgG4LhVmTAMXpMgXM/U8pC1aOH2SjeKzcW+QsCehNtQvbx6NVcc5Ogrwo4xRqT2 kTFZL6LMffWGXWlKPvLG7E5cjeXYv46nFPCojQMdEYM362qu+JgQTqCclDAw7w55qlFe AmSvJkueoboGHTIGi8qfD9fD5jbLKd53T7Y3vvgpxSa7ITCpZP+XI2DC4NppSpx1CyXx DIXHhzr1klPmsnfRyGkaVzGpDIPJzGronl/DNbOzwBrV62fwa5MBrmjtz2HekYKcCLH5 xTLmYAfeMvY1k78JITc8X4eKeViSD0IlwNi/LlyfV1JCs5npHjSdQlKQS/S1IORbeMFu rkvw==
- In-reply-to: <1537907787.166425.1520521784.2C5972A6@webmail.messagingengine.com>
- 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
- Openpgp: preference=signencrypt
- References: <057ea9a2-d934-59e6-3109-e5093f0f9878@googlemail.com> <20180925192153.uwitfgrd2yydxtah@tarpaulin.shahaf.local2> <75619dc0-7b02-45bd-7cd9-a5078d6829a5@googlemail.com> <1537907787.166425.1520521784.2C5972A6@webmail.messagingengine.com>
Am 25.09.18 um 22:36 schrieb Daniel Shahaf:
> Oliver Freyermuth wrote on Tue, 25 Sep 2018 22:02 +0200:
>> 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(){
>>>> - 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.
>
> Pushed. I changed the log message to avoid mentioning implementation
> terms (the variable's name) in ChangeLog, which is user-facing.
Thanks! Didn't know this is copied as-is, I'll take better care
in the future. Hopefully the commit message of the attached patch is better.
>>> The 'break' on line 12 looks odd. Does zathura really ignore
>>> /usr/lib/zathura/foo.so if /usr/local/lib/zathura/bar.so exists and
>>> /usr/local/lib/zathura/foo.so does not?
>>
>> You are correct in spotting this, if I read the zathura code correctly
>> (not a girara expert...), it "does the right thing" and searches the
>> full list of paths.
>>
>> I'll try to cook up a patch fixing both those issues. Might take a
>> while though, since I'm just starting with this (basically I started
>> to investigate after "zathura <tab>" stopped doing anything after a
>> zsh upgrade, makinɡ usage rather cumbersome).
>
> Thanks for the patch and looking into the additional issue.
The attached patch fixes the second issue, I tested with a dummy .so
in /usr/local/lib/zathura. Plugin file formats are now also made unique.
Let me know if this can be simplified, or if it is in any case unneeded since the "uniqueness"
is implicit in the matching code later on - I'm still learning more and more about the wonders of zsh expansion,
and every bit I learn leaves me wondering how I could ever survive without that knowledge up to now.
Cheers,
Oliver
> P.S. Our of curiosity, what's that U+0261 LATIN SMALL LETTER SCRIPT G doing there?
Spotted very well, my font and mail client hid that from me.
I did accidentally hit the keybinding for SCIM (Smart Common Input Method) while typing,
and it started to interfere. That created some funny characters, and apparently I missed to remove the
"g" once I noticed it.
From 3d95608365dfc165c7a77bd3caad69b66b09f97b Mon Sep 17 00:00:00 2001
From: Oliver Freyermuth <o.freyermuth@xxxxxxxxxxxxxx>
Date: Tue, 25 Sep 2018 23:08:33 +0200
Subject: [PATCH] Fix zathura completion ignoring multiple plugin directories.
---
Completion/X/Command/_zathura | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/Completion/X/Command/_zathura b/Completion/X/Command/_zathura
index 64888d013..5335c1143 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 )
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 \
--
2.16.4
Messages sorted by:
Reverse Date,
Date,
Thread,
Author