Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zathura conpletion for zsh broken
- X-seq: zsh-workers 43556
- From: Oliver Freyermuth <o.freyermuth@xxxxxxxxxxxxxx>
- To: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- Subject: Re: zathura conpletion for zsh broken
- Date: Wed, 26 Sep 2018 04:22:37 +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 :content-transfer-encoding; bh=VLO81sXh7h9SLAiFrV9EaKK5WksHq04C/1ZMMDz/W+8=; b=KXOv3B9KW7YsndChptEBrdpo/h6PKX1E3xI9N+3jUf0pSkJqx/I26YTdEldN0CnsfF 6ZMjUYRoj9nAoCj4/Mn6zJgkqCLcx2LJDdiFtWkW8UijhiBkgZx7WRHId+ZOVWtfphNj NmefUBUoRqJV284cIM4Pfh0SBkCWINrDf6dDlO6/waxpFJcJpW4nki3xYai+cLG+T9Ym +mMEXi96jGRBL3nvepP84ClIAQpvWQCTYZ+hOi+N8J++ubcI/wsXiq5XT2frhOpkJZh2 HotvRhvDlS/oscZ8h21UuX+rY6OkuxTni0QvrOPxR9Ll25lGfJacJNHKb4y3q/B63RCS 8e+w==
- In-reply-to: <1537916165.201389.1520635144.15A3171F@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> <e6938da8-fdc5-834c-df60-b872655139b2@googlemail.com> <1537916165.201389.1520635144.15A3171F@webmail.messagingengine.com>
Am 26.09.18 um 00:56 schrieb Daniel Shahaf:
> Oliver Freyermuth wrote on Tue, 25 Sep 2018 23:22 +0200:
>> 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.
>
> Yes, it is, thank you.
>
> Not all developers copy the message as-is. I happen to use git-am(1)
> to apply patches so it's easier for me to consume patches produced
> by git-send-email(1) or git-format-patch(1), like yours. Other developers
> use other tools and don't care so much about the format so long as it
> can be piped to patch(1) or git-apply(1).
>
> [ Actually, I use a wrapper around git-am(1) that also automatically
> adds the mailing list message number to the log message and creates
> a ChangeLog entry. You might find it an interesting read:
> https://github.com/danielshahaf/zsh-dev/ ]
[ That's indeed a good read, many thanks for the link! ]
>> 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.
>>
>
> I've changed:
> .
> + plugins_files+=( $plugins_dir/*.so )
> .
> to:
> .
> + plugins_files+=( $plugins_dir/*.so(N) )
> .
> to avoid an error if one of the directories exists and contains no *.so
> files. This was a preëxisting bug in the function (it means the '((
> $#plugin_files ))' check was redundant).
Good point!
> Regarding uniqueness, another way to achieve uniqueness is to pass -U to
> the 'typedef -a' command that declares the variable.
That's indeed more beautiful in most cases, and noted down for the future.
I hope I can make good use of that with a future contribution which will surely come
latest when I start to use a tool for which the completion is lacking or even missing.
Many thanks for the helpful advice!
Cheers,
Oliver
>
> Also, it's not idiomatic to use [[ -z $array ]], though it will function correctly.
>
>> 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.
>
> OK :)
>
> Cheers,
>
> Daniel
>
Messages sorted by:
Reverse Date,
Date,
Thread,
Author